|
|||||||||
|
|||||||||
Prerequisite Concepts | |||||||||
Operators: arithmetic |
Use arithmetic operators to calculate numeric expressions. OmniMark supports the following five arithmetic operations: addition, subtraction, multiplication, division and modulo.
For clarity, and to avoid mistakes with the subtraction operator, always surround arithmetic operators with spaces.
Example:
set result to ((a + b) / (x - y)) * z
Use the addition operator (+
) to add in OmniMark.
Use the subtraction operator (-
) to subtract in OmniMark.
Note: Since the hyphen character used in variable names is the same character as the minus sign, OmniMark programmers must be careful to separate minus signs from names. For instance, a - b
is interpreted as a subtraction, while a-b
is interpreted as a name.
Use the multiplication operator (*
) to multiply in OmniMark.
Use the division operator (/
) to divide in OmniMark.
Use the modulus operator (modulo
) to find the modulus of a number with respect to a base value. The modulus is the remainder you get if you divide the number by the base value.
Note: The operators "plus", "minus", "times" and "divide" are deprecated arithmetic operators in OmniMark.
Prerequisite Concepts Arithmetic and comparison operators Numeric expressions |
---- |