Download Print this page

Radio Shack TRS-80 model III Owner's Manual page 141

Mini-disk operation, trsdos disk operating system, disk basic programming language
Hide thumbs Also See for TRS-80 model III:

Advertisement

TRS-80
MODEL
111
DISK
SYSTEM
ais(exp$}
a
ft)iH>characfer
string;
exp$
is
typically
the
name
of
a buffer
lieiii
containing
a numeric
siring.
If
Lm(exp$)<4, aw
illegal
function
call
error occurs;
if
i£u(exp$}>4,
only the
first
four
characters
are
These
functions
let
you
restore
data
to
numeric form
after
it
is
read
from
disk.
Typically the data has
been
read
by
a
get
statement,
and
is
stored
in
a
random-
access
file
buffer.
The
functions
cvd,
cvi,
and cvs
are
inverses of
mkd$,
mki$,
and mks$,
respectively.
For example, suppose
the
name
grosspays
references
an
eight-byte
field in
a
random-access
file
buffer,
and
after
GETting
a record,
grosspays
contains a
mkds
representation
of
the
number
13123.38.
Then
the statement:
PRINT CUD(GROSSPAY$) -TAXES
prints
the
result
of
the difference, 13
123.38
-taxes. Whereas
the statement:
PRINT
GROSSPAY*-TAXES
will
produce
a
type
mismatch
error,
since
string
values
cannot be used
in
arithmetic expressions.
Using
the
same
example,
the
statement
A*=CUD(GROSSPAY$)
assigns the
numeric
value
13123.38
to
the
double-precision
variable
a#.
EOF
End-Of-File Detector
nmexp
specifies
a
file
buffer,
nmexp=1,2„..,tt.
140

Advertisement

loading