Syntax#
goboscript has a syntax inspired from languages such as C, Rust, and Python. Whitespace and indentation has no semantic significance. Statements end in semicolons.
Comments#
Numbers#
0b111 # Binary: 7
0xFF # Hexadecimal: 255
0o777 # Octal: 511
1024 # Decimal: 1024
3.141 # Float: 3.141
Strings#
Booleans#
true is replaced with 1 during compilation.
false is replaced with 0 during compilation.
Boolean Coercion#
Scratch does not allow placing a non-boolean block inside a boolean input. (With the
exception of item # of list and item of list). goboscript will automatically
coerce non-boolean blocks into conditions by wrapping them in a comparison with 1.
is equivalent to