HP -15C Owner's Handbook Manual page 110

Hide thumbs Also See for HP-15C:
Table of Contents

Advertisement

110
Section 10: The Index Register and Loop Control
For example, the number 0.05002 in a storage register represents:
Start count at zero.
I and e Operation. Each time a program encounters I or
e it increments or decrements nnnnn (the integer portion of the loop
control number), thereby keeping count of the loop iterations. It compares
nnnnn to xxx, the prescribed test value, and exits the loop by skipping the
next line if the loop counter (nnnnn) is either greater than (I) or less
than or equal to (e) the test value (xxx). The amount that nnnnn is
incremented or decremented is specified by yy.
With these functions (as opposed to the other conditional tests), the rule is
―Skip if True‖.
False (nnnnn  xxx)
loop
For I: given nnnnn.xxxyy, increment nnnnn to nnnnn + yy, compare
it to xxx, and skip the next program line if the new value satisfies nnnnn >
xxx. This allows you to exit a loop at this point when nnnnn becomes
greater than xxx.
nnnnn x x x y y
0.0 5 0 0 2
Count up to 50.
instruction
´IV
t.
1
instruction
Count by twos.
True (nnnnn > xxx)
exit loop

Advertisement

Table of Contents
loading

Table of Contents