Operators in Statements

Operators are symbols used to perform an operation, comparison, or mathematical function (such as addition or subtraction). Operands are variable names or expressions that are being compared or that a mathematical function is being performed upon.

Some operators are used in expressions by placing the symbol for the operator between two operands. For example:

A + B

The operands A and B are variable names, but they could also have been expressions. The + operator is placed between the two operands and means that the expression A + B will return the value of the sum of the values of the variables A and B.

Several operators follow a slightly different rule. The logical NOT (~ or !), unary minus (-), preincrement (++), predecrement (--), pointer dereference (*), and address of (&) precede their operands. Operators may be combined to form more complex expressions, such as :

A + B * 5 / C <= 11.5

The section that follows discussed operator priority. A detailed list of all VTS operators and their priority levels is provided in Operators.

Topics in this section:

Operator Priority in Statements

Operations involving text values