- 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
++
--
BIPLAN supports only one signed numeric variable type, that is by default long
(if a different type is required see configuration). Numeric variables are identified by @
. The name of variables must not contain numbers, must be composed by lowercase and or uppercase letters and or the symbol _
. Each variable is just an entry of a global array of variables. BIPLAN supports up to 88 variables.
See below how to define a variable:
@test = 10
Variables can be accessed by name:
print @test // Prints "10"
All Variables can be accessed by reference using @[]
:
@test = 111
print @[0] // Prints 111 or the value of the first variable defined
@[0] = 2
print @test // Prints 2
The reference of a variable can be obtained prepending its name with index
:
@a_variable = 10 // index 0
@variable = 1 // index 1
@var = 22 // index 2
print index @var // Prints 2 or the index of $var
The bcc
compiler starts from the longest variable name, for this reason @var
is the last to be compiled and acquires the reference 2.