Understanding expressions

An expression is usually a combination of data elements (called operands) and operators that produces a resulting value. The result of an expression is considered to be either alpha, numeric, or object.

The simplest form of an expression is a single alpha or numeric variable, literal, object handle, or function/method reference without any operators.

Note

A method used in a simple expression must return a type other than VOID; otherwise, a “No operator void” error ($ERR_NOOPER) will result.

You can build more complex expressions by combining operators with operands.

Truth values

The truth value of an expression is based on its result as follows:

Note

A System.String object is always converted to alpha before its truth value is evaluated.