Radio Shack TRS-80 Trsdos & Disk Basic Reference Manual page 143

Micro computer system
Hide thumbs Also See for TRS-80:
Table of Contents

Advertisement

DISK BASIC
MKD$,
MKI$
and
MKS$
(convert
data, numeric-to-string)
MKD$(nmexp)
where
nmexp
is
evaluated
as a
double-precision
number
MKl$(nmexp)
where
nmexp
is
evaluated
as
an
integer,
321
68<=nmexp <321
68;
if
nmexp
exceeds
this
range,
an
ILLEGAL FUNCTION CALL
error occurs;
any
fractional
component
in
nmexp
is
truncated
MKS$(nmexp)
where
nmexp
is
evaluated
as
a single-precision
number
These
functions
change
a
number
to
a
"string".
Actually the
byte
values
which
make
up
the
number
are
not changed; only one
byte,
the
internal
data-type
specifier,
is
changed,
so that
numeric
data
can
be
placed
in
a
string variable.
(See
LEVEL
II
Reference Manual,
VARPTR
Function,
for
details
of
internal
number
representation.)
That
is:
MKD$
returns
an
eight-byte
string
MKI$
returns
a
two-byte
string
MKS$
returns
a
four-byte
string
Examples:
ASC(MKI$(I%))
equals the
lsb
of
1%,
i.e.,
(1%
AND
255)
ASC(RIGHT$(MKI$(I),l))=themsb
of
1%,
i.e.,
INT(I%/256)
LSET
AVG$=MKS$(0.123)
AVG$
would
typically
reference
a
four-byte
random
buffer
field.
Now
it
contains
a
representation
of the
single-precision
number
0.123.
7-57

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents