EasyManua.ls Logo

Commodore 128D - Page 296

Commodore 128D
427 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...
PRINT
#
PRINT
USING
30A
=
4:B
=
2:?A+B
6
40
J
=
41:PRINT
J;:PRINT
J-1
41
40
50
PRINT
A;B;:D
=
A
+
B:PRINT
D;AB
4 2
6
2
See
also
POS,
SPC,
TAB
and
CHAR
functions.
—Output
data
to
files
PRINT#
file
number,
print
list
PRINT#
is
followed
by
a
number
which
refers
to
the
data
file
previ
ously
OPENed.
The
number
is
followed
by
a
comma
and
a
list
of
items
to
be
output
to
the
file
which
can
be
strings,
numeric
or
string
variables
or
numeric
data.
The
comma
and
semicolon
act
in
the
same
manner
for
spacing
with
printers
as
they
do
in
the
PRINT
state
ment.
Some
devices
may
not
work
with
TAB
and
SPC.
EXAMPLE:
10
OPEN
4,4
Outputs
the
data
"HELLO
20
PRINT#4,"HELLO
THERE!",A$,B$
THERE"
and
the
variables
A$
and
B$
to
the
printer.
10
OPEN
2,8,2
20
PRINT#2,A,B$,C,D
Outputs
the
data
variables
A,
B$,
C
and
D
to
the
disk
file
number
2.
NOTE:
The
PRINT*
command
is
used
by
itself
to
close
a
command
channel
to
the
printer
before
closing
the
file,
as
follows:
SeeCMD.
10
OPEN
4,4:
CMD
4
30
PRINT"PRINT
WORDS"
40
PRINT#4
50
CLOSE
4
Direct
all
normal
output
to
the
prints.
Redirects
output
to
normal
output
channel
(screen)
—Output
using
format
PRINT
[#fllonumber,]
USING"format
list";
print
list
This
statement
defines
the
format
of
string
and
numeric
items
for
printing to
the
text
screen,
printer
or
other
device.
The
format
is
put
in
quotes
or
assigned
to
a
string
variable,
such
as
A$.
This
is
the
for
mat
list.
Then
add
a
semicolon
and
a
list
of
what
is
to
be
printed
in
the
format
for
the
print
list.
The
list
can
be
variables
or
the
actual
values
to
be
printed.
288
BASIC
7.0
ENCYCLOPEDIA—Basic
Commands
and
Statements

Table of Contents

Other manuals for Commodore 128D

Related product manuals