Sel language, Whxx (selected when true variable) – IAI America DS-S-C1 User Manual

Page 88

Advertising
background image

86

WHXX (Selected When True Variable)

12. SEL Language

n

o

i

s

n

a

p

x

E

n

o

i

t

i

d

n

o

c

)

R

O

·

D

N

A

(

t

u

p

n

I

n

o

i

t

i

d

n

o

c

)

g

a

l

F

·

O

/I

(

d

n

a

m

m

o

C

t

s

o

P

)

g

a

l

F

·

t

r

o

p

t

u

p

t

u

O

(

d

n

a

m

m

o

C

1

d

n

a

r

e

p

O

2

d

n

a

r

e

p

O

X

X

H

W

.

o

N

e

l

b

a

i

r

a

V

a

t

a

D

[Function]

This is used between the SLCT

EDSL commands. Compares the 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 command 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

Assign 20 to variable 1.

LET

2

10

Assign 10 to variable 2.

:
SLCT

Branches.

WHEQ 1

10

If the content of variable is 10, (1) is executed but since the

:

content is 20, program refers to the next condition.

(1)
:
WHGT 1

*2

Executed if the content of variable 1 is greater than the

:-

content of variable 2.

(2)

Variable 1 (=20) > variable 2 (=10), so (2) is executed.

:
OTHE

If no conditions are fufilled, this is executed. Since (2) was

:

executed, (3) will not be executed.

(3)

:
EDSL

When one of the conditions is met and that command is

:

performed, processing moves to EDSL. In this example,

(4)

(2) and (4) 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.

Advertising