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 variable:
set <variable> <value>
example:
set text "hello, world"
set name "Oliver"
set name "Jeff"
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 <content> <variable to store>
example fro asking what's your name and storing the name in cell 0:
input "What's your name?: " input_value
comments:
//<comment>
example:
//this line will be skipped and is just for commenting code
if statements:
if <value> <operator> <value>
<do stuff>
end_if
//operators:
// == (equal to) != (not equal to) < (lower than) !< (not lower than) > (higher than) !> (not higher than)
example with else:
input "What's your name?: " name
if :name == "Oliver"
print "You are the developer of gray!"
else
print "You are not the developer"
end_if
accesing variables:
:<variable>
example:
set text "hello, world"
print :text
calculate stuff:
+ plus
- minus
* times
/ divided by
% modulo
example:
//calculations are written in parentheses
print (1 + 3)
//simple calculator for additions
input "num1" "number 1 "
input "num2 "number 2 "
print (:num1 + :num2)
join strings:
["string1" "string2" ...]
example:
print ["hello " "world"]
set text1 "hello "
set text2 "world"
print [:text1 :text2]