- Bytecode
- Configuration
- Comments
// - Conditions
ifelseend - Constants
truefalseHIGHLOWINPUTOUTPUT - Cycles
forwhilenextbreakcontinue - Functions
functionlocalsreturndone - Macros
macro - Numeric variables
@@[] - Operators
+-*/%==!=>>=<<=&&||&|^>><<++--~not - Strings
::[] - System functions
adc readargscharcursordelayfile closefile openfile readfile writepipe closepipe openpipe readpipe writeincludeindexinputio openio readio writememmillisnumbernumericprintrandomrestartserial openserial readserial writesizestopstring - 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
nextAfter the pre-processing phase the code above looks like this:
while true
print "Hello World!"
delay 100
nextMacros 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.