- Bytecode
- Configuration
- Performance
- 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
++--
| Arithmetic | Logic | Bitwise | Unary prefix |
|---|---|---|---|
+ Addition |
== Equal |
& And |
++ Increment then use |
- Subtraction |
!= Not equal |
| Or |
-- Decrement then use |
* Multiplication |
< Less |
^ Xor |
~ Bitwise not |
/ Division |
<= Less or equal |
<< Left shift |
not Logic not |
% Modulus |
> Greater |
>> Right shift |
|
>= Greater or equal |
|||
&& And |
|||
|| Or |
BIPLAN uses a layered recursive descent parser that naturally enforces standard mathematical hierarchy that perfectly mirrors standard C precedence:
- Factor: Parentheses, numbers, constants, variables, function calls and system functions
- Term:
*,/,% - Expression:
+,-,&,|,^,<<,>> - Relation:
==,!=,<,>,<=,>=,&&,||
For this reason this expression 2 + 3 * 4 evaluates to 14; multiplication has a higher precedence than addition.
In BIPLAN the following program is incorrect:
if 1 == 1 || 0 == 0 print "OK" endThe correct form is:
if (1 == 1) || (0 == 0) print "OK" endParenthesis are required for the interpreter to detect a nested relation and compute it before the primary relation.