Next: Nice C operators
Previous: General operators
Be aware that there is no strict rule on the integer size in NASL2.
The interpretor implements them with the native ``int'' C type,
which is 32 bit long on most systems, and maybe 64 bit long on a few
one7. There is no overflow or underflow protection.
- + is the addition operator.
- - is the subtraction operator.
- * is the multiplication operator.
- / is the integer division operator. Please note
- NASL2 does not support floating point operations.
- Division by zero will return 0 instead of crashing the interpretor.
How nice of us!
- % is the modulo. Once again, if the 2
operand is null, the interpretor will return 0 instead of crashing
- ** is the exponentiation or power function8.