Types Of Flags; Setting, Clearing, And Testing Flags - HP 48gII Advanced User's Reference Manual

Graphing calculator
Hide thumbs Also See for 48gII:
Table of Contents

Advertisement

decision. Because certain flags have unique meanings for the calculator, flag tests expand a program's decision-
making capabilities beyond that available with comparison and logical functions.

Types of Flags

The hp49g+/hp48gII has two types of flags:
-
System flags. Flags
!
User flags. Flags 1 through 128. User flags are, for the most part, not used by any built-in operations. What
!
they mean depends entirely on how the program uses them.
Appendix C lists the 128 system flags and their definitions. For example, system flag -40 controls the clock
display - when this flag is clear (the default state), the clock is not displayed - when this flag is set, the clock is
displayed. (When you press %CLK% in the H%MISC% menu, you are setting or clearing flag
Note that for the hp49g+/hp48gII, there are no display annunciators to indicate that user flags 1 through 5 are
set, like the hp48S-series and hp48G-series calculators.

Setting, Clearing, and Testing Flags

Flag commands take a flag number from the stack – an integer 1 through 128 (for user flags) or -1 through -128
(for system flags).
To set, clear, or test a flag:
1. Enter the flag number (positive or negative).
2. Execute the flag command – see the table below.
!°%TEST% LL:
%FS?%
%FC?%
%FS?C%
%FC?C%
Example:
System Flag. The following program sets an alarm for June 6, 2007 at 5:05 PM. It first tests the
status of system flag -42 (Data Format flag) in a conditional structure and then supplies the alarm date in the
current date format, based on the test result.
1-26 RPL Programming
-128
1 through
. These flags have predefined meanings for the calculator.
Flag Commands
Key
Programmable
Command
SF
%SF%
CF
%CF%
FS?
FC?
FS?C
FC?C
Description
Sets the flag.
Clears the flag.
Returns 1. (true) if the flag is set, or
0. (false) if the flag is clear.
Returns 1. (true) if the flag is clear,
or 0. (false) if the flag is set.
Tests the flag (returns true if the
flag is set), then clears the flag.
Tests the flag (returns true if the
flag is clear), then clears the flag.
-
40.)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents