User's Manual
HARSFEN0602
Notation ||
Description Logical OR. The result is 1 if any of the arguments is nonzero, 0 if both are zero.
The arguments are not truncated to integers before evaluations
Number of
arguments
2
Output type 0 or 1
Example 1 || 0 yield 1
0 || 0 is 0.
4.2.4.18 Logical NOT
Notation !
Description Logical NOT. The result is 1 if the argument is zero, and 0 else
The arguments are not truncated to integers before evaluations
Number of
arguments
1
Output type 0 or 1
Example !4 yields 0
!0 yields 1
!0.0004 yields 1
4.2.4.19 Unary Minus
Notation -
Description Unary MINUS. The result is negative if the argument is positive, and vise
versa.
The arguments are not truncated to integers before evaluations
Number of
arguments
1
Output type The same as argument
Example -4.5 yields –4.5
-4 yields –4
(-4) yields 4
-5+5 yields 0
4.2.4.20 Bitwise Left Shift and Right Shift operators
Notation << or >>
Description The bitwise shift operators shift their first operand left (<<) or right (>>) by the
number of positions the second operand specifies.
The arguments are truncated to integers before evaluations.
Number of
arguments
2
Output type 32 bit long integer.
Example 8>>2 yields 2
8<<2 yields 32
4.2.5 Mathematical functions
The following table presents the mathematical built-in functions of the language.
Function names are case sensitive.
Operator Description Returns