EasyManua.ls Logo

Casio FX6300G - Page 119

Casio FX6300G
187 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...
E H Convenient Program Commands
The programs for this unit are made based upon manual calculations. Special
progam commands, however, are available to allow the selection of the formula,
and repetitive execution of the same formula.
Here, some of these commands will be used to produce more convenient programs.
Jump commands
Jump commands are used to change the flow of program execution.
Programs are executed in the order that they are input (from the lowest step number
first) until the end of the program is reached. This system is not very convenient
when there are repeat calculations to be performed or when it is desirable to transfer
execution to another formula. It is in these cases, however, that the jump com
mands are very effective. There are three types of jump commands: a simple un
conditional jump to a branch destination, conditional jumps that decide the branch
destination by whether a certain condition is true or not, and count jumps that
increase or decrease a specific memory by one and then decide the branch desv
tination after checking whether the value stored equals zero or not.
Unconditional jump
The unconditional jump is composed of Goto and Lbl” . When program exe
cution reaches the statement Goto ri' (where n is a number from 0 through 9),
execution then jumps to Lbl n (n is the same value as Goto n). The uncondi
tional jump is often used in simple programs to return execution to the beginning
for repetitive calculations, or to repeat calculations from a point within a program.
Unconditional jumps are also used in combination with conditional and count jumps.
Example The previously presented program to find the surface area and
volume of a regular tetrahedron will be rewritten using Goto 1
and Lbl 1 to allow repeat calculations.
The previous program contained:
?, A, :, V~~, 3, x , A, x2, A ,
\T, 2, -r, 1 , 2, x , A, xy, 3 19 steps
* Hereinafter, commas (,) will be used to separate steps for the sake of clarity.
Add Goto 1 to the end of the program, and add Lbl 1 to the beginning of
the program as the branch destination.
If this is simply left the way it is, however, the volume will not be displayed and
execution will move immediately to the input of one side at the beginning. To pre
vent this situation, insert a display command (J) in front of the Goto 1 .
- 1 2 0 -

Related product manuals