To initialize a Mathscript script, type 'init' as a line. Any code before the 'init' line will be ignored.
Everything before init will be ignored.
add 0 0
sub 9 6
init
add 3 6
9.0
When an arithmetic function, such as 'add', is called, the output will always be printed out to the console. When a non-arithmetic function, such as 'var' is called, the system will not return anything. However, there are still some other system functions which print to the console, such as 'get'.
init
add 0 3
var i 8
get i
3.0 8.0
In it's current state, Mathscript will not generate any error messages. Instead, it will just ignore the erroneous lines.
init
add 0 3
asdflskdjfsldfjsfakjsfjfskf
3.0
Since Mathscript ignores erroneous lines, comment lines can just be written out normally. If you want to comment out a line of code, just add a symbol such as '#' and then a space to the beginning of the line. You can also write things like directions before initializing the program, as all lines before the 'init' line will be ignored.
init
div 1 2
This line will be ignored.
# add 0 6
The line above was ignored.
0.5
© 2021 Helix Development Group