beautypg.com

Sel language, Scpy, Scmp (compare character string) – IAI America DS-S-C1 User Manual

Page 94

background image

92

[Function]

Copies the character string from the column in operand 2 to the column in operand 1.
Copies only the length set by the SLEN command. When operand 2 is a literal character, that
is the length copied.

[Example]

SCPY

1

‘ABC’

Copy ‘ABC’ to column 1.

SLEN

10

Set the length of the operation to 10 bytes.

SCPY

100

200

Copy the length of the operation to 10 bytes.
Copy 10 bytes from the column 200 to column 100.

LET

1

300

Assign 300 to variable 1.

LET

2

400

Assign 400 to variable 2.

SLEN

5

Set the length of the operation to 5 bytes.

SCPY

*1

*2

Copy 5 bytes from column 400 (the content of variable 2)
to column 300 (the content of variable 1).

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

l

a

n

o

i

t

p

O

l

a

n

o

i

t

p

O

Y

P

C

S

.

o

N

n

m

u

l

o

C

.

o

N

n

m

u

l

o

C

r

e

t

c

a

r

a

h

C

l

a

r

e

t

i

L

12. SEL Language

SCPY

SCMP (Compare Character String)

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

l

a

n

o

i

t

p

O

l

a

n

o

i

t

p

O

P

M

C

S

.

o

N

n

m

u

l

o

C

.

o

N

n

m

u

l

o

C

r

e

t

c

a

r

a

h

C

l

a

r

e

t

i

L

Q

E

[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 are ‘ABC’ flag 600 turns ON.

SLEN

5

Set the length to be compared to 5 bytes.

SCPY

10

30

999

When the 5 bytes from column 10 and column 30 are equal,
flag 999 turns ON.

LET

1

10

Assign 300 to variable 1.

LET

2

20

Assign 400 to variable 2.

SLEN

3

Set the length of the operation to 5 bytes.

SCMP

*1

*2

310

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, the output turns ON.

12.18

String processing commands