Download Print this page

Radio Shack TRS-80 Owner's Manual page 146

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

Advertisement

10
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)
mm
(mm
&
t
.
.
.]
[
emu
]
[
.
.
.]
[
dRSH)
©
]
Quoted-string terminator
sets
end
of
file
encountered
255th
data character
encountered
'
'
(double quote)
"[
.
•][,]
"[
.
..][(nn®]
"[
.
.
.][GHTH)®
Unquoted-string terminator
sets
end
of
file
encountered
255th
data character
encountered
'
(EWTER)
[©]
Figure 13
describes
how
input#
assigns data
to
a variable.
128

Advertisement

loading

This manual is also suitable for:

Model iii