
Copyright L
EXIBOOK
2002
- 59 -
GB
command
Unconditional jump
Conditional jumps
Count jumps
Formula
Lbl n
Goto n (n = natural number from 0 through 9)
Left Relational Right
Side Operator Side
Statement: Statement
(Relational operators: =,
≠
, <,>, >, <)
Isz Memory name:
Statement: Statement
Dsz Memory name:
Statement: Statement
(Memory name consists of single character
from A through Z, such as A[ ], etc.)
Operation
Performs unconditional jump to
Lbl n corresponding to Goto n
Left and right sides are
compared. If the conditional
expression is true, the
statement after
⇒
is executed.
If not true, execution jumps to
the statement following the
next: or
Statements
include numeric expressions,
Goto commands, etc
Numeric value stored in
memory is increased (Isz) or
decreased (Dsz) by one. If
result equals 0, a jump is
performed to the statement
following the next < or >.
statements include numeric
expressions, Goto commands,
etc.
⇒
4.7.5 Subroutines
A program contained in a single program area is called a “main routine”. Often used program segments
stored in other program areas are called “subroutines”. Subroutines can be used in a variety of ways to help
make calculations easier. They can be used to store formulas for repeat calculations as one block to be
jumped to each time, or to store often used formulas or operations for call up as required.
Example: Determine the altitude at one-second intervals of a ball thrown into the air at an initial
velocity of V(m/sec) and an angle of S°. The formula is expressed as: h = Vsin
θ
t -
1/2
gt
2
, with g=9.8,
with the effects of air resistance being disregarded.
Program:
Deg, :, 0,
→
, T, :, ?,
→
, V, :, ?,
→
, S, :,
Lbl, 1, :, lsz, :, V, x, sin, S, x, T, -,
9, ., 8, x, T, x
2
,
÷
, 2,
, Goto, 1
38 steps
In this program the unit of angular measurement is set and memory T is first initialized (cleared). Then the
initial velocity and angle are input into memories V and S respectively.
Lbl 1 is used at the beginning of the repeat calculations. The numeric value stored in memory T is counted
up (increased by 1) by Isz T. In this case, the Isz command is used only for the purpose of increasing the
value stored in memory T, and the subsequent jump does not depend upon any comparison or decision. The
Isz command can also be used in the same manner as seen with the Dsz command for jumps that require
decisions, but, as can be seen here, it can also be used to simply increase values. If, in place of the Isz com-
mand, another method such as “T+1
→
T” is used, five steps are required instead of the two for the (Isz T)
method shown here. Such commands are convenient ways of conserving memory space. Each time
memory T is increased, calculation is performed according to the formula, and the altitude is displayed.
It should be noted that this program is endless, so when the required value is obtained.
are
pressed to terminate the program.
(summary)
1
MODE
Содержание GC1000i
Страница 1: ...GB INSTRUCTION MANUAL GRAPHIC CALCULATOR GC500i GC1000i...
Страница 2: ...GB Copyright LEXIBOOK 2002...