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

Page 184

Advertising
background image

Page 179

Chapter 4. Programming

[Function]

Compares the column in Operand 1 and the column in Operand 2.

Compares only the length set by the SLEN command.
When Operand 2 is a literal character, that is the length compared.

[Example]

SCMP

1

'ABC'

600

When column 1 ~ 3 is 'ABC', flag 600 turns ON.

SLEN

5

SCMP

10

30

999

Set the length to be compared to 5 bytes.
When the 5 bytes from column 10 and column 30 are equal, flag 999 turns ON.

LET

1

10

LET

2

20

SLEN

3

SCMP

*1

*2

310

Assign 10 to variable 1.
Assign 20 to variable 2
Set the length to be compared to 3 bytes.
When the 3 bytes in column 10 (the content of variable 1) and the 3 bytes in column 20 (the content of
variable 2) are equal, then output 310 turns ON.

SCMP (Compare Character String)

E x p a n s io n

c o n d itio n

(A N D · O R )

In p u t

c o n d itio n

(I/O · F la g )

C o m m a n d

P o s t

(O u tp u t p o rt · F la g )

C o m m a n d

O p e ra n d 1

O p e ra n d 2

O p tio n a l

O p tio n a l

S C M P

C o lu m n n o .

C o lu m n n o .

L ite ra l c h a ra c te r

R e q u ire d

Advertising
This manual is related to the following products: