beautypg.com

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

Page 192

background image

Page 187

Chapter 4. Programming

Expansion

(AND·OR)

Input

(Input·Output·Flag)

Command · Statement

Post

(Output · Flag

Command

Operand 1

Operand 2

WSXX

Column No.

Column No · Literal character

WSXX (Selected when true Character)

Function:

This is used between the SLCT ~ EDSL commands. 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 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

SCPY

1

‘ABC’

LET

1

3

:
SLCT
WSEQ 1‘XYZ’
:



:
WSGT 2

*1

:

‚

:
OTHE
:

ƒ

:
EDSL
:

„

:

Sets the number of characters to be compared to 3.
Assigns ‘ABC’ to column 1.
Assigns 3 to variable 1.

Branches.
If columns 1~3 are ‘XYZ’,

 is executed but since columns 1~3

are ‘ABC’, this is not executed.

If the number of characters designated by SLEN from column 2 are
the same as the contents in the column indicated by variable 1, then
‚ 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: