Section 8: Program Branching and Controls
91
of this loop can be controlled by a conditional branch, an
¦
instruction
(written into the loop), or simply by pressing any key during execution
(which stops the program).
Conditional Tests
Another way to alter the sequence of program execution is by a
conditional
test,
a true/false test which compares the number in the X-register either to
zero or to the number in the Y-register. The HP-15C provides 12 different
tests, two explicit on the keyboard and 10 others accessible using
|
T
n.
*
1.
Direct:
|
£
and
|
~
.
2.
Indirect:
|
T
n
.
n
Test
n
Test
0
x ≠ 0
5
x = y
1
x > 0
6
x
≠ y
2
x < 0
7
x > y
3
x ≥ 0
8
x < y
4
x ≤ 0
9
x ≥ y
*
Four of the conditional tests can also be used for complex values, as explained in section 11 on page 132.
Summary of Contents for HP-15C
Page 1: ...HP 15C Owner s Handbook HP Part Number 00015 90001 Edition 2 4 Sep 2011 ...
Page 17: ...Part l HP 15C Fundamentals ...
Page 64: ......
Page 65: ...Part ll HP 15C Programming ...
Page 118: ...118 ...