Operators

The following operators are available for use in expressions in AvanWaves.

Arithmetic Operators

The following are arithmetic operators:

Operator Function Description

+ Addition

- Subtraction

* Multiplication

/ Division

Comparison Operators

The following operators perform comparisons and return values of 0 or 1:

Operator Function Description

> Greater than

< Less than

<= Greater than or equal to

>= Less than or equal to

!= Not equal to

== Equal

Boolean Operators

The following operators evaluate Boolean expressions and return values of 0 or 1:

Operator Function Description

&& Performs the AND operation. Returns 1 if both values are nonzero, and returns 0 otherwise.

|| Performs the OR operation. Returns 1 if either value is nonzero, and returns 0 otherwise.

! Performs the NOT operation. Returns 1 if its argument is 0, and returns 0 otherwise.

Conditional Operator

The following conditional operator is available:

Operator Function Description

<expr1> ? <expr2> : <expr3> <expr1>, <expr2>, and <expr3> are expressions. If the result of <expr1> is nonzero, then the result of <expr2> is returned, otherwise the result of <expr3> is returned.

AvanWaves User Guide - Release 2001.2