- Bytecode
- Configuration
- Comments
#
- Conditions
if
else
end
- Constants
true
false
HIGH
LOW
INPUT
OUTPUT
- Cycles
for
while
next
break
continue
- Functions
function
locals
return
- Macros
macro
- Numeric variables
@
@[]
- Operators
+
-
*
/
%
==
!=
>
>=
<
<=
&&
||
&
|
^
>>
<<
++
--
~
not
- Strings
:
:[]
- System functions
adc read
args
char
cursor
delay
file close
file open
file read
file write
include
index
input
io open
io read
io write
jump
label
mem
millis
number
numeric
print
random
restart
serial open
serial read
serial write
size
stop
string
system
- Unary operators
++
--
macro [name] [code]
A macro is a capitalized keyword of at least 2 characters associated with a single line of code containing at least one statement. Each time the macro's keyword occurs in the source it is substituted with its associated line of code. This task is executed by the pre-processor before the compilation phase starts.
macro WAIT delay 100
while true
print "Hello World!"
WAIT
next
After the pre-processing phase the code above looks like this:
while true
print "Hello World!"
delay 100
next
Macros are useful to associate a keyword with an integer constant or a string literal, without consuming a variable address. Macros can be used also to associate a keyword to a system function call or a function call with a predefined set of parameters.