1-44 RPL Programming
Program: Comments:
"!
+=BM<D+!N:P2<!
67!03![[!
:;<=f!h!+=BM<D+!D:L!
<=4
Checks if the name list
(NAMES) exists, if not,
creates an empty one.
Y;6E<!
I2;L=<E6D:!L2:6L=DlI!
f!
f!IB44!B!=BM<I!3h!
f!IN6<Y!B!=5MS<KI!H!h!
h!3!O;LLD<
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.
K<2<B:!#!&!"
Stores the returned value
in c.
OBD<!&!3![[!
!!!!!!!!!!!:;<=!
!!!!!!!!!!!!!!Y;6E<!
Case 1 (ADD name),
while cancel is not
pressed, do the
following:
IB44!B!=BM<I!
f!
fI=BM<lI!I<=:<K!=BM<I!Hh!
fI2;L=<lI!I<=:<K!B!2;L=<!
=5MS<KI!H!h!h!
f!h!f!h!f!h!6=7LKM!
K<2<B:!
Creates an input form that
gets the name and phone
number. The two fields
accept only strings (object
type 2).
452!
67f!=LNBE!h!;<B4!2LD!
:;<=!
4KL2!
IOkoqu)p)!%kpy!*t)u(Z!
%)*kj)!qj)ZZtGm!LrI!
MD>SLT!
Checks if either field in the
new entry is blank.
If either one is, displays a
message.
<ED<!3!
#E6D:!=BM<D!'!DLK:!
+=BM<D+!D:L!
<=4!
<=4!
<=4!
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.
&!H![[
Case 2 (View a Number).
:;<=!
67!f!h!=BM<D!DBM<!
:;<=!
IPL5!M5D:!B44!B!!
=BM<!76KD:I!
MD>SLT!
Checks if NAMES is an
empty list.
If it is, displays a message.