User flags, User flags -4, Flag commands – HP 49g Graphing Calculator User Manual
Page 23
Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".
![background image](/manuals/632032/23/background.png)
Flag commands
The flag commands are listed and explained in the table below. The flag
commands enable you to set and clear flags as well as having a value
returned that indicates the status of a specified flag: 1 if the flag is set, 0 if
the flag is clear.
Command
Description
SF
Sets the specified flag.
CF
Clears the specified flag.
FS?
Returns true (1) if the specified flag is set and false (0) if the
flag is clear.
FC?
Returns true (1) if the specified flag is clear and false (0) if the
flag is set.
FS?C
Tests the specified flag, returns true (1) if it is set or false (0) if
it is clear, and then clears it.
!FC?C
Tests the specified flag, returns true (1) if it is clear or false (0)
if it is set, and then clears it.
Table 2-1 Flag commands
User Flags
You can also apply the conunands listed in the table above to user flags.
(User flags are mainly used in programming.)
User flags are positive numbers, while system flags are negative numbers.
(In the System Flags list—discussed on page 2-1—the system flags are
shown as positive munbers. However, when you are setting, clearing, and
testing system flags, you must specify the flag as a negative number.)
You have access to 128 user flags. You can set, clear, and test them the
same way as with system flags. For example, to clear flag 25 that your
program has set, you issue the command CF(25).
Page 2-4
System flags