Commodore PET User Manual page 259

Table of Contents

Advertisement

Be sure that the logical file CLOSEd is the same one that was previously OPENed.
OPEN
r2'''NUMBERS''
CLOSE
1
The listing of NUM.PRINT# looks like this:
la
PRINT"~.
CREATE NUMERIC DATA TAPE •• ":PRINT
213
PRINT" •• MOUNT TAPE; PRESS <RETURN:> WHEN READY •• ":PRINT
3t:1 GET A$: IF A$="" THEN
313
413
PRINT" •• OPENING DATA FILE •• ": OPENl ,
1.·2 .•
"NUMBERS"
513
FOR N=l TO la
60
PRINT N
70
PRINT#l,N
813
NEXT N
90
PRINT" •• CLOSING DATA FILE •• ":CLOSEl
100
END
The main statements that differentiate this program from a program that prints
only to the screen are at lines 40, 70, and 90: the OPEN, PRINT#, and CLOSE
commands.
Below is a RUN of the program:
•• CREATE NUMERIC DATA TAPE ••
•• MOUNT TAPE; PRESS <RETURN WHEN READY••
•• OPENING DATA FILE ••
PRESS PLAY & RECORD ON TAPE
#1
Of<
1
2
3
4
5
6
7
8
9
la
••CLOSING DATA FILE ••
246

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cbm

Table of Contents