Scratcholang

From Esolang
Jump to navigation Jump to search

Scratcholang is an esoteric programming language created by User:PikaboyPlaysGames that you are officially able to use in Scratch. You can use it here.

Language Overview

Scratcholang is heavily inspired by Brainf*** and uses some of it's commands and system of storing data but instead of 30000 cells, there's only 7.

Symbol Description Notes
+ Adds number in the selected cell by one N/A
- Subtracts number in the selected cell by one N/A
> Moves to the next cell Moves to the first cell if the selected cell is the last one
< Moves to the previous cell Moves to the last cell if the selected cell is the first one
1 Outputs the cell as a number N/A
A Outputs the cell as a letter in the english alphabet Going too high will output the space ( ) instead
= Outputs the cell as a symbol In outputting the cell to be a symbol, each symbol will be selected from these in numerical order ~ ` ! @ # $ % ^ & * ( ) _ - + = { [ } ] : ; " ' I \ < , > . ? / Going too high will also output space
/ Sets the number in the cell back to 0 N/A
, Adds the number in the selected cell by the cell after it Will do nothing if it's the seventh cell
. Subtracts the number in the selected cell by the cell after it Will do nothing if it's the seventh cell
; Same as , but it'll add to the number before it Will do nothing if it's the first cell
: Same as . but it'll subtract to the number before it Will do nothing if it's the first cell
# Acts like some sort of checkpoint for @ or $ N/A
@ Repeats everything that was done after the last # once N/A
$ Same as the @ symbol but does it indefinitely N/A
* Waits for an input from the user before continuing Must be a number
["code"] Checks if the latest input from the user is higher than the number in the selected cell, if true then the code inside the cell will run. Can only be used once
("code") Checks if the latest input from the user is lesser than the number in the selected cell, if true then the code inside the cell will run. Can only be used once
{"code"} Checks if the latest input from the user is equal to the number in the selected cell, if true then the code inside the cell will run. Can only be used once

Examples

HELLO WORLD!

A "hello world!" program will simply output "Hello World" with or without the exclamation mark. Some Hello World! programs look like this.

++++,,>A<+A>,,>----AA+++A>A<<,>++++A----A<.>A+++A<++++A<-A-=

Truth Machine

A Truth Machine is simple, if given an input of 0 then the program prints "0" once, if the input is 1 then it will print "1" constantly.

+*{#1$}/1

See also

External Resources

Scratcholang Project/Interpreter