beautypg.com

Chapter 4. programming – IAI America S-SEL-E User Manual

Page 191

background image

Page 186

Chapter 4. Programming

Expansion

(AND·OR)

Input

(Input·Output·Flag)

Command · Statement

Post

(Output · Flag

Command

Operand 1

Operand 2

WHXX

Variable No.

Data

WHXX (Selected when true Variable)

Function:

This is used between the SLCT ~ EDSL commands. Compares contents of the variable in Operand 1 to the
value in Operand 2. If the conditions are met, then the code following the WHXX will be executed up to the
next WHXX. If the conditions are not met, the program will go to the next WHXX command or OTHE com-
mand or EDSL.

WHXX

EQ ............ Operand 1 = Operand 2
NE ............ Operand 1

Operand 2

GT ............ Operand 1 > Operand 2
GE ............ Operand 1

Operand 2

LT

............ Operand 1 < Operand 2

LE ............ Operand 1

Operand 2

Example:

LET

1

20

LET

2

10

:
SLCT
WHEQ 1

10

:



:
WHGT 1

*2

:

‚

:
OTHE
:

ƒ

:
EDSL
:

„

:

Assigns 20 to variable 1.
Assigns 10 to variable 2.

Branches.
If the content of variable is 10,

 is executed but since the content

is 20, program refers to the next condition.

Executed if the content of variable 1 is greater than the content of
variable 2.
Variable 1 (=20) > variable 2 (=10), so

‚ is executed.

If no conditions are fulfilled, this is executed. Since

‚ was

executed,

ƒ will not be executed.

When one of the conditions is met and that command is performed,
processing moves to EDSL. In this example,

‚ and „ are

executed.

*

When there is a possibility of several conditions being met, the WXXX command that appears first goes into effect and the
commands that follow are not executed.
When conditions are demanding, list the ones with the highest priority first.

This manual is related to the following products: