Apple II manual Statement SYNTAX/FUNCTION Read, Statement SYNTAX/FUNCTION SPC, Print ! Value ISA

Models: II

1 257
Download 257 pages 49.17 Kb
Page 244
Image 244

 

then a carriage return/line feed is

 

executed.

 

"VALUE IS" will be displayed and printed.

 

String expressions may be printed.

STATEMENT

SYNTAX/FUNCTION

READ

READ variable [, variable]

 

Read data into specified variables from a

 

DATA statement. The first piece of data

 

read will be the first piece of data listed in

 

the first DATA statement of the program.

 

The second piece of data read will be the

 

second piece listed in the first DATA

 

statement, and so on. When all of the data

 

have been read from the first DATA state-

 

ment, the next piece of data to be read will

 

be the first piece listed in the second DATA

 

statement of the program. Attempting to

 

read more data than there is in all the

 

DATA statements in a program will cause

 

an OD (out of data) error.

STATEMENT

SYNTAX/FUNCTION

SPC

SPC (expression)

 

Prints I space [or blank) characters on the

 

terminal. May be used only in a PRINT

 

statement. I must be =>0 and <=255 or

 

an FC error will result.

STATEMENT

SYNTAX/FUNCTION

TAB

TAB (expression)

 

Spaces to the specified print position

 

(column) on the printer. May be used

 

only in PRINT statements. Zero is the

 

leftmost column on the termainl, 19 the

 

rightmost. If the carriage is beyond pos

 

position I, then no printing is done. I must

 

be =>0 and <=255.

 

If I is greater than 19, the printer will skip

 

the required number of lines to arrive at

 

the specified position.

306STRING FUNCTIONS

STATEMENT SYNTAX/FUNCTION

ASC

ASC (string expression)

 

Returns the ASCII numeric value of the

 

first character of the string expression X$.

 

See Appendix E for an ASCII/number

 

conversion table. An FC error will occur

 

if X$ is the null string.

STATEMENT

SYNTAX/FUNCTION

CHR$

CHR$ (expression)

 

Returns one character, the ASCII equiva-

 

lent of the argument (I) which must be a

 

number between 0 and 255. See Appendix E.

STATEMENT

SYNTAX/FUNCTION

GET

GET string variable

410 PRINT ! "VALUE IS";A

420 PRINT MID$(A$,2);

EXAMPLE

490 READ V,W

EXAMPLE

250 PRINT SPC(I)

EXAMPLE

240 PRINT TAB(I)

EXAMPLE

300 PRINT ASC(X$)

EXAMPLE

275 PRINT CHR$(I)

EXAMPLE

10 GET A$

Page 244
Image 244
Apple II Statement SYNTAX/FUNCTION Read, Statement SYNTAX/FUNCTION SPC, Statement SYNTAX/FUNCTION TAB, Print ! Value ISA