EasyManua.ls Logo

Radio Shack TRS-80 PC-3 - Page 216

Radio Shack TRS-80 PC-3
289 pages
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...
Numeric
Masks
A
numeric
USING
mask
may
only
be
used
to
display
numeric
values, i.e.,
numeric
constants
or
numeric
variables. If a string
constant
or
variable
is
displayed
while a
numeric
USING
mask
is
in
effect,
the
mask
will be ignored. A value
which
is
to
be dis-
played
must
always
fit
within
the
space
provided
by
the
mask.
The
mask
must
reserve
space
for
the
sign
character,
even
when
the
number
will
always
be positive.
Thus,
a mask
which
shows
four
display
positions
may
only
be used
to
display
numbers
with
three
digits.
Specifying Number
of
Digits
The
desired
number
of
digits
is
specified
using
the
'#'
character.
Each
'#'
in
the
mask
reserves
space
for
one
digit.
The
display
or
print
always
contains
as
many
characters
as
are
designated
in
the
mask.
The
number
appears
to
the
far right
of
this
field;
the
remaining
positions
to
the
left
are filled
with
spaces. Positive
numbers,
therefore,
always
have
at
least
one
space
at
the
left
of
the
field.
Since
the
PC-3
Pocket
Computer
maintains
a
maximum
of
10 significant digits,
no
more
than
11
'#'
characters
should
be
used
in a
numeric
mask.
NOTE:
In
all
examples
in
this
appendix,
the
beginning
and
end
of
the
displayed
field will be
marked
with
an'
I'
character
to
show
the
size
of
the
field.
Statement
10: USING
"####"
20:
PRINT
25
30:
PR INT
-350
40:
PRINT
1000
Display
(Set
the
PC-3
Computer
to
the
RUN
position,
type
RUN,
and
press
(ENTER)
.)
2 5
-350
ERROR
7
IN
40
219

Table of Contents

Related product manuals