Download Print this page

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

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

Advertisement

TRS-80
MODEL
III
DISK
SYSTEM
would
assign values
as follows:
A$ =
PECOS
B$= TEXAS
"GOOD MELONS"
C$
=
null string
If
a
comma
is
inserted
in
the
data
image
before
the
first
double
quote,
c$
will
get the value,
good
melons.
These
are
very simple
examples
just to
give
you
an
idea of
how
input works.
However,
there are
many
other
ways
to
input data
different terminators,
different target variable types,
etc.
Rather than
taking
a
shotgun approach
and
trying
to
cover
them
all,
we'll give a
generalized description of
how
input
works
and what
the
terminating characters
and
conditions
are,
and
then provide
several
examples.
When
basic encounters
a
terminating
character,
it
scans
ahead
to
see
how many
more
terminating characters
it
can
include with
the
first
terminator.
This ensures
that
basic
will
begin looking
for the
next data item
at
the correct place.
The
list
below
defines the various terminating
sets
input#
will
look
for.
It
will
always
try to
take-in the largest
set
possible.
Numeric-input terminator
sets
end
of
file
encountered
255th
data character
encountered
,
(comma)
(ENTER)
CENTER)
©
[
...][
(ENTER)
]
[
.
.
.HCHUH)©]
Quoted-string terminator
sets
end
of
file
encountered
255th
data character
encountered
"
(double quote)
"[
...][,]
"
t
..][ (ENTER)]
"[
...HGHUH)©]
Unquoted-string terminator
sets
end
of
file
encountered
255th
data character
encountered
'canst©]
Figure 13
describes
how
input#
assigns data
to
a variable.
128

Advertisement

loading