beautypg.com

Operators, Mathematical, Boolean – Visara Master Console Center Scripting Guide User Manual

Page 50: Mathematical boolean, Table 6. list of mathematical operators

background image

Chapter 3 Script Syntax

Scripting Guide

50

Operators

Mathematical

The following mathematical operators may be used in numeric
expressions:

Character Operator

+ -

Addition and Subtraction

* / %

Multiplication, Integer division, and Modulo

- Unary

Minus

:= Assignment

Table 6. List of Mathematical Operators

Boolean

In Boolean expressions:

ƒ

Zero is interpreted as FALSE and all other values are interpreted as
TRUE.

ƒ

Boolean expressions that evaluate to FALSE have a value of 0.

• Boolean expressions that evaluate to TRUE have a value of 1.
Boolean expressions consist of string and numeric expressions that
evaluate to a TRUE or FALSE value. Often, a Boolean comparison
operator is used, for example:

IF %A + %B == 4

This is not always the case. For example:

IF %A

//same as IF %A == TRUE

To stretch the realm of Boolean expression, consider the following
example:

%Sum := (%A == %B) + 4

//%Sum will always be either 4 or 5

// (%A == %B) will always evaluate to true (1)

// or false (0).