EasyManua.ls Logo

Radio Shack TRS-80 Model III - Page 151

Radio Shack TRS-80 Model III
274 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...
BASIC
Be
sure to
enter
the
correct
type of value
according to what
is called for by
the INPUT
statement. For
example, you
can't input a
string-value
into
a
numerical
variable. If
you
try to, the
Computer will
display a
?REDO
?
and give you
another chance
to enter
the
correct
type of data
value, starting with the
first
value called for by the
INPUT
list.
The
Computer will accept numeric
data for
string input.
NOTE: You cannot
input an
expression into a
numerical value
you must input a
simple numerical constant.
Example:
10
INPUT XI, Yl*
20 PRINT
XI
i
Yl*
30
END
>RUN
? 7
+
3
7REDO
? 10
??
"THIS IS A
COMMA ,
10
THIS
IS
A
COMMA
»
It
was necessary
to put
quotes around
"THIS IS A COMMA.
'
'
because the string
contained
a comma.
If
you type in more data
elements than
the INPUT statement
specifies, the Computer
will
display the message
7EXTRA IGNORED
and continue
with normal
execution of your
program.
If you press
(ENTER) without
typing
anything, the
variables will have the values they
were
previously
assigned
.
You can also
include a
'
'prompting message' '
in your INPUT statement.
This will
make it easier to
input the data
correctly. The
prompting message must
immediately follow
"INPUT" , must
be enclosed
in quotes, and must be
followed by
a
semi-colon.
Example:
10 INPUT
"ENTER NAME*
AGE"?
N*»
A
20
PRINT
"HELLO,
»
; N$?
",
YOU
ARE
AT
LEAST" 5
A
*
365? "DAYS OLD"
RUN
ENTER
NAME?
AGE?
DO
RAMEY, 31
HELLO, DO
RAMEY,
YOU
ARE
AT
LEAST 11315
DAYS
OLD
141

Other manuals for Radio Shack TRS-80 Model III

Related product manuals