The Print# Command; The Close Command - Commodore CBM Printer 4022 User Manual

Hide thumbs Also See for CBM Printer 4022:
Table of Contents

Advertisement

The PRINT#
Command
The
syntax
of
the
PRINT*
command
is:
PRINT#
Ifn,
data
PRINT*
works
just
like
PRINT
except
that
it
directs
output
to
the
printer
instead
of
the video
screen.
The
line
to
the
printer
is
closed
after
printing
the
designated
data.
The
line
or
bus
to
the
printer
is
said
to
be
"unlistened."
Therefore,
if
you have used
the
CMD
command,
it
is
necessary
to
follow
it
with a
PRINT*
command
in
order
to
close
down
the
connection
between
the
printer
and
the
computer.
NOTE:
In
standard
Commodore
BASIC,
the
PRINT
command
can be
abbreviated as a question
mark
(?).
You
may
not
do
this
with
PRINT*.
It
must
always be typed
out as
PRINT*.
The
CLOSE Command
The
syntax
of
this
command
is:
CLOSE
Hn
You
should always
close a
file
after
printing
from
it.
You
may
not
exceed
ten
open
files
so
it
is
well to
make
a
habit of closing
files
when
you
are finished with
them. This
way
you
will
always
have
the
maximum
number
of
files
available
for use.
As you
shall
see
later,
one
file
may
be
open
under
several
logical
file
numbers
at
one
time.
Remember,
since
CMD
does
not close the
line
to
the
printer,
you must
always precede
a
CLOSE command
with
PRINT*
in
order
to
properly close the
file.
Example:
Right
Wrong
OPEN
5.
4
PRINT#5."HELL0 THERE-
CLOSE
5
OPEN
5,
4
OPEN
5.4
CMD
5."HELL0
THERE"
not
CMD
5.
"HELLO THERE'
PRINT#5:CL0SE
5
CLOSE
5
15-

Advertisement

Table of Contents
loading

Table of Contents