Modifying The Program - Commodore 1541 User Manual

Hide thumbs Also See for 1541:
Table of Contents

Advertisement

REMEMBER:
1)
Before a file can be written 10, or read from, a POSITION command must be ex
ecuted.
2)
You must always use PRINT #1 with the POSITION command. This puts your
daia under command channel control.
3)
The FIRST character string code in ihe POSITION command must correspond 10
the THIRD number (channel ~) in ihe OPEN statement. Except OPEN 1, 8, 15
(see lines 8 and 30 of above program).
A)
For convenience, use the FOR . . . NEXT loop variable in ihe SECOND character
siring, CHRS(i), of the POSITION command where I equals ihe record number
(see lines 20 and 30 of above program).
MODIFYING THE PROGRAM
1)
You can add mare POSITION commands to make more fields wiihin each record.
Remember to include the character position number as the last CHRS, when ad
ding fields,
2)
To change the length of each record, change the value of CHR£(50) in LINE 8.
3)
The number of records in ihe file is determined by the POSITION command. The
current example can process 5 records; the FOR . . . NEXT loop variable is 1 io5.
The program can process 720 records, but in order to use more than 512 records,
the number 2 must be in the THIRD CHRSf ) of the POSITION command. For
more than 256, use [he number I, For up to 256 records, simply use the FOR - ■ .
NEXT loop variable. EXAMPLE: FOR I = I TO 256 may access 256 records.
44

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents