EasyManua.ls Logo

Commodore CBM - Page 259

Commodore CBM
447 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
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:
••
CREA
TE
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

Table of Contents

Other manuals for Commodore CBM

Related product manuals