HP (Hewlett-Packard) 35s Calculator User Manual


 
14-12 Programming Techniques
Annunciators for Set Flags
Flags 0, 1, 2, 3 and 4 have annunciators in the display that turn on when the
corresponding flag is set. The presence or absence of 0, 1, 2, 3 or 4 lets you know
at any time whether any of these five flags is set or not. However, there is no such
indication for the status of flags 5 through 11. The states of these flags can be
determined by executing the FS? instruction from the keyboard. (See "Using Flags"
below.)
Using Flags
Pressing
displays the FLAGS menu:   
After selecting the function you want, you will be prompted for the flag number (0–
11). For example, press
() to set flag 0; press
() to set flag 10; press ()  to
set flag 11.
FLAGS Menu
A flag test is a conditional test that affects program execution just as the comparison
tests do. The FS? n instruction tests whether the given flag is set. If it is, then the next
line in the program is executed. If it is not, then the next line is skipped. This is the
"Do if True" rule, illustrated under "Conditional Instructions" earlier in this chapter.
If you test a flag from the keyboard, the calculator will display "" or "".
Menu Key Description
 n Set flag. Sets flag n.
 n Clear flag. Clears flag n.
 n Is flag set? Tests the status of flag n.