The complete program with the unconditional jump added should look like this:
Lbl, 1, A \T , 3, x, A, x2, A ,
\T , 2, -4-, 1,2, x , A, xy, 3, A , Goto, 1 25 steps
Now let’s try executing this program.
*For details on inputting programs and editing programs, see sections 4-1 and 4-2.
*Henceforth, the displays will only show calculation result output.
IProgll Q IIexe]
|T)[o3(ixI)
0QE1S
173. 2050808
117. 8511302
97. 42785793
49. 71844555
Stored in PO.
The length of the
side -10
The length of the
side = 7.5
Since the program is in an endless loop, it will continue execution. To terminate
execution, press SQ D.
|mode||~i |
Besides the beginning of the program, branch destinations can be designated
at any point within the program.
Example Calculate y=a*+b when the value for x changes each time, while
a and b can also change depending upon the calculation.
Program
?, A, :, ?, B, :, Lbl, 1, :, ?, - , X,
A, x , X, + , B A , Goto, 1 23 steps
When this program is executed, the values for a and b are stored in memories
A and B respectively. After that, only the value for x can be changed.
In this way an unconditional jump is made in accordance with “ Goto” and “ Lbl” ,
and the flow of program execution is changed. When there is no “ Lbl /z” to cor
respond to a “ Goto n” , an error (Go ERROR) is generated.
- 1 2 1 -