The
PRINT#
Command
The PRINT # command works just like the BASIC command PRINT
except
that
it directs the
output
to the printer instead
of
to
the video
screen. After the data
you
have sent to the printer
is
finished, the lfn
is
automatically closed. This
is
called "unlistening" and it means
that
in
order
to
PRINT#
more data, you must reĀ·open the
t1le
by using
another
CMD
command.
By
the way, please notice
that
you can NOT leave a space
between PRINT
and
#
or
the command will
not
work.
NOTE: In
CBM
BASIC V2, the PRINT command can be
abbreviated by using a
"?".
You can NOT
do
this with
PRINT#.
You must always type
PRINT#
in
full.
The SYNTAX for the
PRINT#Command
is:
PRINT#
Ifn, data
PRINT#
99,
"HELLO
VIC"
PRINT#
2, CHR$(124),123,63,76
The CLOSE Command
The CLOSE command
is
a very important command
to
use efficiently. You
should always CLOSE a
t1le
after you've printed from it. The reason
is
that
you
can only have a maximum
of
10 files open at anytime. Therefore,
if
you
make a habit
of
closing files when you've finished with them,
you
will always have the maximum number
of
t1les
available.
NOTE: Since the
CMD
command does not close the line
to
the
printer, you must always follow a PRINT # command with
the CLOSE command in order to properly close a file.
The SYNTAX for
the
CLOSE Command
is:
CLOSE Ifn
CLOSE
99
CLOSE 2
EXAMPLES Using all commands correctly:
OPEN 99, 4
PRINT#
99, "HELLO VIC"
CLOSE 99
19.