*In this
case,"$"
is used as one example of a currency unit.
NOTE: Keys
I % I
I
R
·CM
I
,
[EJ , CM±]
,
and the mark ~cannot be used
in
a program.
Press
ON[]
three
times, then press the "B"
key
(
I
SCDL
1
1
)
of the definable start
keys.
Press
I
ENTER
I
to register the change to line 20
in
the memory.
To RUN the program, move the operation mode switch back to CAL·RUN
Now,
if
you press the "B" key of the definable start keys, the program will RUN
starting from line 20. Since the value for COST A is still
$50, you can hold that
value constant and do repeated calculations using this cost for various
quantities. If
at some time
it
is
necessary to change the value of the
cost, RUN
the program from the beginning by pressing the A key.
If, on the other hand, you wish to keep QUANTITY B constant, press
I
ENTER
I
instead of keying
in
a number when the program asks for the quantity to be
input.
As you can see, there are a number of possible applications for this helpful
function.
20
INPUT llQUANTI
T
Y=ll , B
Move the cursor to I in
"INPUT" using
[El
(lower keyboard).
To modify the program so that you can hold one of the variables constant (in this
case, COST A) and start the program from a different
line, make this change to
line 20. First slide the operation mode switch to
COMP/PRO, then scroll the
program to line 20 using
l
/"--.
1.
30
IENTERI
The result is then shown
in
the display.
The program then asks for the
quantity. We will make the quantity be 30. Key
in
50
IENTERI
Key
in
data
in
response to the first question, which asks you to input "cost". Let
us say the cost is $50.* Key in
41
CHAPTER 9 INTRODUCTION TO BASIC PROGRAMMING
unning
Program
)
RUN the program, move the operation mode switch to CAL·RUN. Now,
ace the template over the eight definable start keys under the LCD, and press
e
[A]
key
([ITO). This key was assigned
in
line
1
O;
it
causes program
:ecution to begin at that
line
.
J "A"
:INPUT"COST=",A
J
INPUT
"QUANTITY=",
B
lC=A•B
)PRINT "TOTAL=",
C
>END
ten key
in
these lines exactly:
rst, move the operation mode switch to
:JMP/PRO.
friting
Program
)
this, enter this short program.
re eight keys below the display on the left assume different functions while
in
OM P modes. A special template is provided to be placed over the keys while
ey are used
in
this mode. (See
illustration.)
Each key is assigned a letter (A to
,
J
to M). These letters appear on the display when the respective key is
essed while writing or running a program. To attach the template, bend the
mplate so that you can insert the tabs on the middle left side and bottom right
::leto fit into the slots of the body. To take off the template, hook your nail to the
1ht
side of template and si
mply lift up.
re purpose of these definable keys
is
to make
possible for you to RUN a program starting
om whatever line you desire. To see how to
efinable
Start Keys and Template
) register the change, press
NTERI
CHAPTER 9 INTRODUCTION TO BASIC PROGRAMMING