HP 48gII Advanced User's Reference Manual page 70

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

Advertisement

Program:
«
'NAMES' VTYPE
WHILE
"PHONELIST OPTIONS:"
{
{ "ADD A NAME" 1}
{ "VIEW A NUMBER" 2 }
} 1 CHOOSE
CASE c 1 ==
"ADD A NAME"
{
{"NAME:" "ENTER NAME" 2}
{"PHONE:" "ENTER A PHONE
NUMBER" 2 } }
{ } { } { } INFORM
REPEAT
DUP
IF{ NOVAL } HEAD POS
THEN
ELSE 1
END
END
c 2 ==
THEN
IF { } NAMES SAME
THEN
"YOU MUST ADD A
1-44 RPL Programming
IF -1 ==
THEN{ } 'NAMES' STO
END
REPEAT  c «
THEN
WHILE
DROP
"Complete both fields
before pressing OK"
MSGBOX
LIST NAMES + SORT
'NAMES' STO
END
NAME FIRST"
MSGBOX
Comments:
Checks if the name list
(NAMES) exists, if not,
creates an empty one.
While cancel is not
pressed, creates a choose
box that lists the database
options. When OK is
pressed, the second item
in the list pair is returned
to the stack.
Stores the returned value
in c.
Case 1 (ADD name),
while cancel is not
pressed, do the
following:
Creates an input form that
gets the name and phone
number. The two fields
accept only strings (object
type 2).
Checks if either field in the
new entry is blank.
If either one is, displays a
message.
If neither are, adds the list
to NAMES, sorts it, and
stores it back in NAMES.
Ends the IF structure, the
WHILE loop, and the
CASE statement.
Case 2 (View a Number).
Checks if NAMES is an
empty list.
If it is, displays a message.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

49g+

Table of Contents