EasyManua.ls Logo

Commodore Plus 4 - Page 156

Commodore Plus 4
234 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...
EXAMPLE'
PRINT
#
PRINT
USING
RESULT
10
PRINT
"HELLO"
HELLO
20
A$
=
"THERE":PRINT
"HELLO,"AS
HELLO,THERE
30A=4:B
=
2:PRINTA
+ B
6
50J
=
41:PRINTJ;:PRINTJ-l
41
40
=
A-B:PRINTA;B;C,D
4
2
6
See
also:
POS(}, SPC(),
and
TAB()
FUNCTIONS.
fiie#,
print
list
There
are
a
few
differences
between
this
statement
and
the
PRINT.
First
of
ail,
the
word
PRINT#
is
followed
by
a
number,
which
refers
to
the
device
or
data
file
previously
OPENed.
The
number
is
followed
by
a
comma,
and
a
list
of
things
to
be PRINTed.
The
comma
and
semicolon
act
in
the
same
manner
for
spacing
as they
do
in
the
PRINT
statement.
Some
devices
may
not
work
with
TAB
and
SPC.
EXAMPLE:
100
PRINT#1,"HELLO
THERE!",A$,B$.
PRINT
\#filenumber]
USING
format
list;
print
list;
These
statements
let
you
define
the
format
of
string
and
numeric
items
you want
to
print
to
the
screen,
printer,
or
another
device.
Put
the
for
mat you want
in
quotes.
This
is
the
format
list.
Then
add
a
semicolon
and
a
list
of
what
you
want
printed
in
the
format
for
the
print
list.
The
list
can
be
variables
or the actual
values
you
want
primed.
For
example:
5X
=
32:
Y=
100.23:
A$
=
"CAT"
10
PRINT
USING
"$##.##"
;13.25,X,Y
20
PRINT
USING
1'###>#11;"CBM",A$
When
you
RUN
this,
line
10
prints
out:
_
-
S13.25
$32.00
prints
*****
instead
of
Y
value
because
Y
has
5
digits,
which
does
not
conform
to
format
list
(as
ex
plained
below)
147

Other manuals for Commodore Plus 4

Related product manuals