Click on the blue text to download and don't forget to extract the .zip file. To execute code right click on your code file and press open with... and select other app . Then search for gray.exe and press ok. Alternatively you can open gray.exe and paste the file path of your code.
print something on the console:
print <content>
example:
print "hello, world"
store data in a cell (you can store data in memory cells that are going from 0 to infinity):
set <cell index> <content>
example for setting cell 5 to hello world:
set 5 "hello, world"
go to a line in your code:
goto <line>
example:
print "infinit loop"
goto 1
you can make jumpmarks with $ to not affect lines
$infinit-loop
print "infinit loop"
goto $infinit-loop
store user input:
input <memory cell to store> <content>
example fro asking what's your name and storing the name in cell 0:
input 0 "What's your name?: "
comments:
//<comment>
example:
//this line will be skipped and is just for commenting code
if statements:
if_equal <value> <value>
if_not_equal <value> <value>
if_higher <value> <value>
if_not_higher <value> <value>
if_lower <value> <value>
if_not_lower <value> <value>
example for a truth machine:
input 0 "input: "
if_not_equal :0 0
goto 5
goto 7
print :0
goto 5
accesing cells:
:<cell index>
example:
set 0 "hello, world"
print :0
calculate stuff:
+ plus
- minus
* times
/ divided by
% modulo
example:
//calculations are written in parentheses
print (1 + 3)
//simple calculator for additions
input 0 "number 1"
input 1 "number 2"
print (:0 + :1)
join strings:
["string1" "string2" ...]
example:
print ["hello " "world"]
set 0 "hello "
set 1 "world"
print [:0 :1]