Commodore 128 System Manual page 304

Table of Contents

Advertisement

10 READ A$, B$, C$
20 DATA JOHN, PAUL, GEORGE
READ three strings from data statements.
10 READ A, B$, C
20 DATA 1200, NANCY, 345
READ a numeric variable,a string variable and another numeric
variable.
RECORD
Position relative file pointers
RECORD# logical file number, record number [,byte]
This statement positions a relative file pointer to select any byte
(character) of any record in the relative file. The logical file
number can be in the range between 1 and 255. The record
number can be in the range 1 through 65535. Byte number is in
the range 1 through 254. See your disk drive manual for details
about relative files.
When the record number value is set higher than the last record
number in the file, the following occurs:
For a write (PRINT #) operation, additional records are created to
expand the file to the desired record number.
For a read (INPUT #) operation, a null record is returned and a
" RECORD NOT PRESENT ERROR" occurs.
EXAMPLES:
10 DOPEN #2,"CUSTOMER"
20 RECORD#2,10,1
30 PRINT#2,A$
40 DCLOSE #2
This example opens an existing relative file called " CUSTOMER"
as file number 2 in line 10. Line 20 positions the relative file
pointer at the first byte in record number 10. Line 30 actually
writes the data, A$, to the file.
17-62

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents