Operators
 
 
* multiplicate
** raise to power
+ plus (also for strings)
- minus
/ devide
=,<,<=,>,>=,<> comparison operators (see also...)
$ HEX operator (eg. $FF eq. 255)
% (prefix) ASCII operator (eg. %A eq. 65)
% (postfix) (LZ only) Percentage operator
6+5% eq. 6.3
6-5% eq. 5.7
6*5% eq. 0.3
0.3/5% eq. 6
6.3>5% eq. 6
6.3<5% eq. 0.3

see also: = AND OR NOT


var = exp

assigns a value to a variable

Note: not to be confused with the = comparison operator


lexp = lexp1 AND lexp2

logical AND operator with floats
bitwise AND operator with integers

 (see note at NOT!)

 see also: OR NOT


lexp = NOT lexp1

logical NOT operator with floats
bitwise NOT operator with integers

Note: Be sure to understand the difference between logical and bitwise NOT!
Look at the following example:

IF LOC("ABCDE","C") :PRINT "found a C" :ENDIF
IF NOT LOC("ABCDE","C") :PRINT "found no C" :ENDIF
This code will - rather surprisingly - print both texts because LOC returns 3 as integer and NOT 3 (bitwise!) is -4 which is nonzero and therefor interpreted as TRUE!

 see also: AND OR


lexp = lexp1 OR lexp2

logical OR operator with floats
bitwise OR operator with integers

 (see note at NOT!)

 see also: AND NOT


TRAP <command> (only applicable with certain commands)

 makes program ignore any error when executing the following command.

 Use ERR to check if an error has occurred.

Note: unlike normal behaviour (clear the buffer), trapped EDIT and INPUT will exit and report error 206 (ESCAPE) when ON/CLEAR is pressed

 see also: ERR ONERR