HP 32SII Owner's Manual page 202

Rpn scientific calculator
Hide thumbs Also See for 32SII:
Table of Contents

Advertisement

Using Flags
Pressing
After selecting the function you want, you will be prompted for the flag
number (0–11). For example, press
{
flag 11.
Menu Key
{
{
{
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 "
"
".
It is good practice in a program to make sure that any conditions you will be
testing start out in a known state. Current flag settings depend on how they
have been left by earlier programs that have been run. You should not
assume that any given flag is clear, for instance, and that it will be set only if
something in the program sets it. You should make sure of this by clearing the
flag before the condition arises that might set it. See the example below.
Using Flags.
Example:
The "Curve Fitting" program in chapter 16 uses flags 0 and 1 to determine
whether to take the natural logarithm of the X– and Y–inputs:
Lines S03 and S04 clear both of these flags so that lines W07 and W11
(in the input loop routine) do not take the natural logarithms of the X–
and Y–inputs for a Straight–line model curve.
13–12 Programming Techniques
File name 32sii-Manual-E-0424
Printed Date : 2003/4/24
displays the FLAGS menu: {
}
to set flag 10; press
FLAGS Menu
} n
Set flag. Set flag n.
} n
Clear flag. Clears flag n.
Is flag set ? Tests the status of flag n.
} n
Size : 17 .7 x 25.2 cm
} {
} {
{
} 0 to set flag 0; press
Description
}
{
}
1 to set
" or

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents