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

Page 89

Advertising
background image

87

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

S

W

.

o

N

m

u

l

o

C

r

e

t

c

a

r

a

h

c

l

a

r

e

t

i

L

·

.

o

N

n

m

u

l

o

C

[Function]

This is used during SLCT

EDSL. Compares the character string in the columns in operand 1 and

operand 2. If the conditions are met, then the code following the WSXX will be executed up to the next
WSXX. If the conditions are not met, the program will go up to the next WSXX command or OTHE
command or EDSL. Comparison is made based on the length designated in the SLEN command. When
operand 2 is a literal character, that is the length that is executed.

WSXX

EQ

• • •

Operand 1

=

Operand 2

NE

• • •

Operand 1

Operand 2

[Example]

SLEN

3

Sets the number of characters to be compared to 3.

SCPY

1

‘ABC’

Assign ‘ABC’ to column 1.

LET

1

3

Assign 3 to variable 1.

:
SLCT
WSEQ 1

‘XYZ’

Branches.

:

If columns 1~3 are ‘XYZ’, (1) is executed but since columns

(1)

1~3 are ‘ABC’, this is not executed.

:

WSEQ 1

‘ABC’

:

If columns1~3 are ‘ABC’, (2) is executed. Therefore, this

(2)

code is executed.

:
OTHE
:

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

(3)

executed, (3) will not be executed.

:
EDSL

When one of the conditions is met and that command is performed,

:

processing moves to EDSL. In this example, (2) and (4)

(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.

WSXX (Selected When True Character)

Advertising