EasyManua.ls Logo

HP 15c Collector's Edition

HP 15c Collector's Edition
308 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
92 Section 8: Program Branching and Controls
Following a conditional test, program execution follows the “Do if True”
Rule: it proceeds sequentially if the condition is true, and it skips one
instruction if the condition is false. A t instruction is often placed
right after a conditional test, making it a conditional branch; that is, the
t branch is executed only if the test condition is met.
Program Execution After Test
If True If False
015-´ b .1
016-
017-| £
018-t .1
019-
020-
Flags
Another conditional test for programming is a flag test. A flag is a status
indicator that is either set (= true) or clear (= false). Again, execution
follows the “Do if True” Rule: it proceeds sequentially if the flag is set, and
skips one line if the flag is clear.
The HP 15c has eight user flags, numbered 0 to 7, and two system flags,
numbered 8 (Complex mode) and 9 (overflow condition). The system flags
are discussed later in this section. All flags can be set, cleared, and tested
as follows:
| F n will set flag number n (0 to 9).
| " n will clear flag number n.
| ? n will check if flag n is set.
A flag n that has been set remains set until it is cleared either by a "
n instruction or by clearing (resetting) Continuous Memory.

Table of Contents

Related product manuals