beautypg.com

Sel language, Read – IAI America DS-S-C1 User Manual

Page 92

background image

90

[Function]

Reads the character string from the channel in operand 1 to the column in operand 2.
Stops reading when the character designated in the SCHA command appears.
The column can be either local or global.

[Example]

SCHA

10

Set LF (= 10) for the ending character.

OPEN

1

Open channel 1.

READ

1

2

Read the character string from channel 1 to column 2 until LF appears.

CLOS

1

Close the channel.

LET

1

2

Assign 2 to variable 1.

LET

2

3

Assign 3 to variable 2.

SCHA

13

Set CR (= 13) for the ending character.

READ

*1

*2

Read the character string from channel 2 (content of variable 1) to column 3
(content of variable 2) until CR appears.

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

D

A

E

R

.

o

N

l

e

n

n

a

h

C

.

o

N

n

m

u

l

o

C

READ

12. SEL Language