■Conditional jumps
The conditional jumps compare a numeric value in memory with a constant or
a numeric value in another memory. If the condition is true, the statement follow
ing the “ =»” is executed, and if the condition is not true, execution skips the state
ment and continues following the next “ :” or “ J ”.
Conditional jumps take on the following form:
* Anyone can be used.
One memory name (alphabetic character from A through Z), constant numeric
values or calculation formulas (A x 2, D—E, etc.) are used for “ left side” and “ right
The relational operator is a comparison symbol. There are 6 types of relational
operators: =,=*, >,<,>,<.
Left side = right side (left side equals right side)
Left side * right side (left side does not equal right side)
Left side > right side (left side is greater than or equal to right side)
Left side < right side (left side is less than or equal to right side)
Left side > right side (left side is greater than right side)
Left side < right side (left side is less than right side)
The “ =>” is displayed when S O are pressed. If the condition is true, execution
advances to the statement following =>. If the condition is not true, the statement
following => is skipped and execution jumps to the statement following the next
“ :” or “ J ”.
A statement is a calculation formula (sin A x 5, etc.) or a program command (Goto,
Prog, etc.), and everything up to the next “ : ” or “ a ” is regarded as one statement.
late the square root of that value. If the input value is less than
zero, reinput another value.
Program
In this program, the input numeric value is stored in memory A, and then it is test
ed to determine whether it is greater than, equal to or less than zero. If the con
tents of memory A are greater than or equal to 0 (not less than zero), the statement
Left side
Relational
operator
Right side => Statement
Statement
side” .
If true
--------------
j
Right side => Statement
Statement
j
If not true
Example If an input numeric value is greater than or equal to zero, calcu-
Lbl, 1, :, ?, A, :, A, >, 0, =», V", A, A , Goto, 1 16 steps
- 1 2 2 -