HP 12C Platinum Owner's Handbook Manual page 103

And problem-solving guide
Hide thumbs Also See for 12C Platinum:
Table of Contents

Advertisement

The HP 12C Platinum provides two conditional test instructions that are used in
programs for conditional branching:
o tests whether the number in the X-register (represented by the x in the
key symbol) is less than or equal to the number in the Y-register
(represented by the y in the key symbol). As discussed in Appendix A, the
number in the X-register is simply the number that would, if the calculator
were in Run mode, be currently in the display; and the number in the Y-
register is the number that would, if the calculator were in Run mode, have
been in the display when \ was pressed. For example, pressing 4\5
would place the number 4 in the Y-register and the number 5 in the
X-register.
m tests whether the number in the X-register is equal to zero.
The possible results of executing either of these instructions are:
If the condition tested for is true when the instruction is executed, program
execution continues sequentially with the instruction in the next line of
program memory.
If the condition tested for is false when the instruction is executed,
program execution skips the instruction in the next line of program
memory and continues with the instruction in the following line.
These rules can be summarized as "DO if TRUE".
rogram Execution
If True
The program line immediately following that containing the conditional test
instruction can contain any instruction; however, the most commonly used
instruction there is i. If a i instruction follows a conditional test
instruction, program execution branches elsewhere in program memory if the
condition is true and continues with the next line in program memory if the
condition is false.
Section 9: Branching and Looping
rogram Execution
If False
1 ,
2,
Line following conditional
3,
test is skipped
4,
5,
6,
105

Advertisement

Table of Contents
loading

Table of Contents