Operator Functions
TDV supports the operator functions listed in the table.
|
X + Y
|
Add
|
|
X||Y
|
Concatenate; for example abc||def returns abcdef.
|
|
X/Y
|
Divide; for example, 18/3 returns 6.
|
|
X ** Y
|
Exponentiate; for example, 2**8 returns 256.
|
|
FACTORIAL or X!
|
Return the factorial of the given integer; for example, 5! returns 60.
|
|
X % Y
|
Modulo; for example 7 % 3 returns 1, because seven divided by 3 leaves a remainder of 1.
|
|
X * Y
|
Multiply.
|
|
-X
|
Negate (unary operator); for example, -(1) returns -1 and -(-1) returns 1.
|
|
X - Y
|
Subtract.
|