[
Jib
trs-80
model
mi
RUN the program.
Remember, to save programming time, use the
"?''
sign for
PRINT. Your display
should look something like this:
WHAT IS
YOUR
FIRST NAME?
ALBERT
WHAT IS
YOUR
MIDDLE
NAME?
BARCUSSI
WHAT
IS
YOUR LAST NAME?
COOSEY
ENTER
THE AMOUNT
PAYABLE?
12385.34
PAY TO THE
ORDER OF A. B.
COOSEY
******
1
2
n 385 .
30 DOLLARS
If you want to
use a double-precision
amount without rounding
off or going
into
scientific notation,
then simply
add the double precision sign
(
#
) after
the variable
P in Lines
560 and 600.
You will then be able
to use amounts
up
to
16 decimal
places
long.
INPUT item list
Causes Computer to stop
execution until you enter the specified number
of values
via the keyboard. The
INPUT statement may specify a list of string
or numeric
variables to be input. The
items in the list must be separated by
commas.
100 INPUT
X$,X1,Z$,Z1
This
statement calls for you
to
input
a string-literal, a number, another
string literal,
and another
number, in
that order.
When
the statement is encountered,
the
Computer will display
a
You
may then enter the values all
at
once
or one at a time . To enter values
all
at
once,
separate them by commas.
(If your string literal includes leading
blanks,
colons
,
or commas
,
you
must enclose the string in quotes
.
)
For
example
,
when line
1 00 (above) is RUN and the
Computer is waiting
for your
input, you could
type
JIM,50,JACK,40
(ENTER)
The
Computer will assign values
as follows:
X$
=
"JIM"
X1=50 Z$
=
"JACK" Z1=40
If you
(
ENTER) the values
one at a time
,
the Computer
will display
a
??
. . .
indicating
that more data is
expected. Continue entering
data until all
the
variables
have been set, at which time
the Computer will advance
to the next
statement in your program
.
140