Commodore 16 User Manual
Download Operation & user’s manual of Commodore 16 Desktop for Free or View it Online on All-Guides.com.
Line 20 prints this:
CBM CAT
CHARACTER
leaves three
spaces before printing "CBM"
as
defined
in format list
Hasn Sign
(#)
Plus(+)
Minus {-)
Decimal
Point
f.)
Comma
(.)
Dollar Sign
($)
Four Carets
(TTTt)
Equal Sign (*=)
Greater
Than Sign
<>)
NUMERIC
STRING
X X
X
X
X
X
X
X
X
X
The hash
sign
(0)
reserves
room lor
a
single cha.'acter In
the output
field. If
the data item contains more
characters lhan
you
have in
your
format
field, the following
occurs:
For
a
numeric
Hem. the entire field
is
filled
with asterisks <). No
numbers are printed.
For example:
10 PRINT USING
"0000")%
For
these
values for
X, this format
displays:
A -12.34 12
A
=
567.89
568
A -123456
••**
For
a STRING item, the string
data Is
truncated
at the bounds
ol the
field. Only
as many characters are printed
as
there
are hash signs
(#)
in
the format item.
Truncation
occurs on the right
The plus
f +)
and minus
(-)
signs
can be used
in
either the first or last
position of
a format field
but
nol
boih.
The
plus
sign
is printed if the
number is positive. The
minus sign is printed If
the number is negative.
132
[
I
I
I
f
[
I
f
I
f
f
r
[
I
i
i
f
f
i
f
i
if
you use a
minus
sign and the
number
is positive, a
blank
is
printed in
the
character position indicated
by
the minus sign
If
you don't use either a plus or minus sign In your formal field for a
numeric
data Item, a
minus sign is printed before
the
first digit or dollar
symbol if the number is negative and no sign is printed If the number Is
positive. This means that you can print one character more If Ihe
number is positive. II
(here
are too many digits to fit into
the field
specified
by the # and
+
/
-
signs,
then an overflow occurs and the field
is filled with asterisks (•).
A
decimal
point
f
)
symbol
designates the
position of the decimal point
in the number You can
only
have one decimal point
in any format
field. If
you don't
specify
a
decimal point In your format field, the value
is rounded
to
the nearest integer and primed without any decimal
places.
When
you
specify
a
decimal point, the number of digits preceding Ihe
decimal point (including the minus sign, if the value is negative) must
nol exceed Ihe number
of
*
before
Ihe
decimal
point. If
there are
too
many digits
an
overflow
occurs and the
field is filled with asterisks
{*).
A comma
(,)
lets you place commas in numeric fields. The position of
Ihe comma in Ihe format lisl indicates where me comma appears In a
printed number Only
commas
within
a
number are printed.
Unused
commas
!o
the left of the first digit
appear as the
filter character. At
least one must precede
the
first comma in
a
field.
If you
specify commas in
a
field and the number is negative, then a
minus
sign is
printed
as the
firs! character even if Ihe character position
is specified
as a
comma.
EXAMPLES:
FIELD EXPRESSION RESULT COMMENT
##.#
+
00.0
0000
0000
-.01
1
-100.5
-1000
0.01-
1.0
-101
Leading zero added.
Trailing zero added.
Rounded
to
no decimal
places.
Overflow because four digits
and
minus
sign
cannol
fil in
field.
133