DIAdem Help

Content Type
Programming Language
Current manual

Operators

Operators

Use operators to assign values to variables and to execute calculations and comparisons.

When you use several operators in an expression, note that VBS normally processes the operators from left to right. The following rules apply: VBS first evaluates arithmetic operations, then comparisons, and finally logical operations. Use parentheses if you want to override this order of precedence. VBS evaluates operations inside parentheses before the operations outside the parentheses. Inside the parentheses the above rules apply.
If the VBS processes the operations "Result = 4 + 5 * 6 + 7" according to precedence, the result of the first example is the value 41. By adding parentheses to "Expression Result = (4 + 5) * (6 + 7)", VBS executes the addition first. The result is then 117.


Arithmetic Operators

SymbolFunction
Exponentiation^
Unary negation-
Multiplication*
Division/
Integer number division\
Modulo arithmeticmod
Addition+
Subtraction-
Character string link&

Comparison Operators

SymbolFunction
Equality=
Inequality<>
Smaller than<
Greater than>
Less than or equal to<=
Greater than or equal to>=
Object equivalenceis

Logical Operators

SymbolFunction
Logical negationnot
Logical conjunctionand
Logical disconjunctionor
Logical exclusionxor
Logical equivalenceeqv
Logical implicationimp
Was this information helpful?