swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsSyntaxLibraries
 
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
 
   
 

Top [ INDEX ] [ CONCEPTS ] [ SYNTAX ] [ LIBRARIES ]

Abridged OmniMark 9.1.0 Documentation Generated: November 11, 2010 at 3:52:02 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.