84
CHAPTER
4
Programming
with
BASIC
Language
This example
is
part
of
a program
to
enter data and distribute them according
to their size. Although the program could be used
as
it is, correct the following
items.
Change
"V
AC" on line 10
to
"CLEAR"
.
10 CLEAR
Change
";"
on
lines
40
to
70
to
"THEN"
.
40
IF
ZCA>>80
THEN
B=B+1:GOTO
90
Since variable expansion
is
necessary in this program, write the DEFM com-
mand, manually executed in the
PB-100/PB-300/FX-700P/FX-802P, at the
beginning.
5
DEFM
20
Example:
PB-
I 00 program
10
INPUT
''1=1/0=2/P=3",N
20
IF
N<1
THEN
10
30
IF
N>3
THEN
10
40
GOTO
N*100
This program
is
used
to
determine branch destination according to the work.
To adapt it for this computer, modify it
as
follows by using an
ON
~
GOTO
statement.
10
INPUT
~1=1/0=2/P=3",N
20
ON
N
GOTO
100,200,300
30
GOTO
10