EasyManua.ls Logo

Commodore Plus 4 - Page 85

Commodore Plus 4
464 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...
BASIC
Version
3.S
Commands,
Functions,
and System
Variables
73
Note,
however,
that
while
a
PRINT
command
can
end
in
either
a
trailing
semicolon
or
a
trailing
comma,
a
PRINT USING
command
can end
only
in
a
trailing
semicolon.
Also,
while
PRINT
command
items
can
be
separated
by
either
commas
or
semicolons,
only
commas
are
allowed
as
item
separators
in
a
PRINT
USING
command.
The
PRINT
USING
command
allows
more
control
over
output
because
the
format
definition
determines
exactly
how
the
output
looks,
so
there
is
no
need
for
semicolons
as
separators
in
a
PRINT
USING
command.
Examples:
10
INPUT
"ITEM";
1$
SO
INPUT
"PRICE";
P
25
REM
PRINT
UP
TO
12
LETTERS
30
PRINT
USING
"###########";
j$-
35
REM
PRINT
THE
PRETAX
PRICE
40
PRINT
USING
"#$##,###.##";
p
50
PRINT
USING
"#####";
"TOTAL";
55
REM
PRINT
THE
PRICE
PLUS
TAX
60
PRINT
USING
"#$##,###.##";
p*l.O6
RUN
ITEM?
VIDEO
EQUIPMENT
PRICE?
1299.99
VIDEO
EQUIPM
$1,299.99
TOTAL
$1,377.99
RUN
ITEM?
YACHT
PRICE?
1000000.99
YACHT
***********
TOT
A
Ti*
**********
NEW
10
INPUT
"TITLE";
A$
20
INPUT
"NAME";
B$
25
REM
CENTER
TITLE
AND
NAME
30
PRINT
USING
"=#################"
;A#
40
PRINT
USING
"=#################'';B$
RUN
TITLE?
TRAINING
CATS
NAME?
JANE
SMITH
TRAINING
CATS
JANE
SMITH
The
#
before
the
$
forces
the
$
to
be
printed
right
next
to
the
first
digit.
With
out
the
leading
#,
blanks
appear
between
the
$
and
any unused
digits
in
the
format.
VIDEO
EQUIP
MENT
is
longer
than
the
12
letters
allowed
by
the
format,
so
it
is
truncated.
On
this
run,
the
number
of
digits
entered
for
the
price
is
greater
than
the
number
accepted
by
the
format,
so
the
field
is
filled
with
*
symbols.
Words
that are
too
long
are
truncated;
numbers
that
are
too
long
are
not
printed
at
all.

Other manuals for Commodore Plus 4

Related product manuals