Recalling And Storing The Flag States - HP 48gII Advanced User's Reference Manual

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

Advertisement

Example:
Program:
«
IF
-42 FC?
THEN
6.152007
ELSE
15.062007
END
17.05 "TEST COMPLETE"
3 LIST STOALARM
»
Example:
User Flag. The following program returns either the fractional or integer part of the number in
level 1, depending on the state of user flag 10.
Program:
«
IF
10 FS?
THEN
IP
ELSE
FP
END
»
To use this program, you enter a number, either set flag 10 (to get the integer part) or clear flag 10 (to get the
fractional part), then run the program.

Recalling and Storing the Flag States

If you have a program that changes the state of a flag during execution, you may want it to save and restore
original flag states.
The RCLF (recall flags) and STOF (store flags) commands let you recall and store the states of the
hp49g+/hp48gII flags. For these commands, a 64-bit binary integer represents the states of 64 flags — each 0
bit corresponds to a flag that's clear, each 1 bit corresponds to a flag that's set. The rightmost (least significant)
bit corresponds to system flag –1 or user flag 1 for the lower groups and system flag -65 or user flag 65 for the
upper groups.
To recall the current flag states:
Execute RCLF (!°L %MODES% %FLAG% L%RCLF% ).
!
RCLF returns a list containing four 64-bit binary integers representing the current states of the lower and upper
groups of system and user flags:
{ #n
#n
system-lower
user-lower
Comments:
Starts the conditional.
Tests the status of user flag 10.
If flag 10 is set, returns the integer part.
If flag 10 is clear, returns the fractional part.
Ends the conditional.
#n
#n
}
system-upper
user-upper
Comments:
Tests the status of flag –42, the Date
Format flag.
If flag –42 is clear, supplies the date in
month/day/year format.
If flag –42 is set, supplies the date in
day.month.year format.
Ends the conditional.
Sets the alarm: 17.05 is the alarm time
and "TEST COMPLETE" is the alarm
message.
RPL Programming 1-27

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents