Expressions

System Testing Supervisor Script Language.

Supervisor scripts may contain integer expressions only.

You may use expressions in variable assignments, IF instructions, and WHILE instructions.

Expressions may contain the following operators:

Operator Description
== Equals
!= Does not equal
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
+ Plus
- Unary or binary minus
* Multiply
/ Divide
% Modulo
! Negation
&& Logical AND
|| Logical OR
ENDOF See ENDOF
STATUS See STATUS

Expressions may be nested with parentheses. Operators obey the following ascending order of priority:

  • &&, ||

  • ==, !=

  • >, >=, <, <=

  • +, Unary or binary -

  • *, /, %

  • !, ENDOF, STATUS

Example

HOST machine IS 193.6.2.1

EXECUTE proc_1 IS machine:program

i = 1

-- declaration of i

j = ( i + 3 2 ) + ( i <= 2 )

-- declaration of j

PRINTLN j

Related Topics

Variables | ENDOF | IF | STATUS | WHILE