Menu

Syntax

Teln0

The syntax of Graphical Machine is simple, it is based on spaces so, absolutely all the code can fit on a single line. However, it is recommended to write the code on several lines, but remember that for the interpreter, this code:
int var1 5
int var2 6
int var3 0
do + var1 var2 var2 var3
is absolutely identical to :
int var1 5 int var2 6 int var3 0 do + var1 var2 var3
that's why, at the end of each line, unless it's the last one, you have to put a space. Here, I replaced the spaces with dashes:
int-var1-5-
int-var2-6-
int-var3-0-0-
do-+-var1-var2-var2-var3

Usually, at the beginning of the line, we put the instruction (int, do, pxl, etc...) followed by the arguments (+, var1, 1523, etc...) and finally, at the end of the line, we add the space.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.