Dokumentaro de Gambaso
Compilation & Installation
Components
Documents
Indekso de Lingvo
Language Overviews
Stream & Input/Output functions
LeguMin
Lexicon
Registro

Arithmetic Operators

Number + Number Adds two numbers.
- Number Computes the opposite sign of a number. Zero is the opposite of itself.
Number - Number Subtracts two numbers.
Number * Number Multiplies two numbers.
Number / Number Divides two numbers, and returns the result as a floating-point number. A Division By Zero (26) error will occur if the value of the number to the right of the slash is zero.
Number ^ Power Raises Number to the power Power.

For example, 4 ^ 3 = 64
Number \ Number

Number DIV Number
Computes the quotient of the two Integer numbers, truncating the result. A Division By Zero (26) error will occur if the value of the number to the right of the backslash is zero.

For example, 13 \ 6 = 2

A \ B = Int(A / B)
Number % Number

Number MOD Number
Computes the remainder of the quotient of the two numbers. A Division By Zero (26) error will occur if the value of the number to the right of the operator MOD is zero.

Comparison

Number = Number Returns TRUE if two numbers are equal.
Number <> Number Returns TRUE if two numbers are different.
Number1 < Number2 Returns TRUE if Number1 is strictly lower than Number2.
Number1 > Number2 Returns TRUE if Number1 is strictly greater than Number2.
Number1 <= Number2 Returns TRUE if Number1 is lower or equal than Number2.
Number1 >= Number2 Returns TRUE if Number1 is greater or equal than Number2.

If the result of a Comparison is assigned to an integer variable, then the result is either -1 (True) or 0 (False)

See also