(Comp.sys.handhelds) Item: 1793 by ervin at pinbot.enet.dec.com Author: [Joseph Ervin] Subj: Re: HP48SX Phone Number Manager V1.4 Date: Thu Jan 24 1991 10:55 This program is a basic database program designed to keep a list of phone numbers and addresses, and provide access to them, editing, etc.. To run it just download the following code and evaluate the program object. The first time you run it, you'll be informed that no database exists and that you should create it. When creating the database, which happens automatically the first time you run the program, you'll be prompted alternately for a name, phone number, and address. If you don't want to enter a phone number or an address, just hit ENTER at these prompts. Just keep entering the data at the prompts, and when you're through just hit ENTER at the name prompt without entering any data. This will terminate the input mode. Note: This method of input termination works any time you are prompted for a name and decide not to enter one. Remember this as it will come in handy at other times when the program prompts you for a name. Once you have created a database, running the program will prompt you as to whether you want to search the list or edit the list. 1. SEARCHING THE LIST. The way to search the list is by pressing SRCH when prompted. The program will search each name in the list for any occurance of the string you enter (when prompted). This way, you can search for people by last name, or whatever. For example, if you have the phone numbers of all the local movie theaters, then entering CINEMA at the prompt will give you a list of all the movie theaters (assuming you were smart enough to use the string "CINEMA" as part of the name for each movie theater). You get the idea. The program will display a list of entries that matched the search string input by the user. The default display mode shows the name/phone number, with a menu item (ADDR) by which the user can choose to display addresses. Note that the same menu button toggles between ADDR mode (displaying addresses) and NUM mode (displaying phone numbers). If you enter an asterisk ("*") at the prompt when searching the list, the program will output the entire list. This is useful for going through the list (in edit mode, say) and deleting entries that are no longer needed. 2. EDITING THE LIST. Basically, just follow the prompts and you'll do well. I tried to make this fairly straightforward, and I have put in some degree of error checking of input data to make sure it makes sense, but I'm sure you can get it to crash if you try. Some simple rules to follow: Avoid typing over the ":Name:", ":Number:", or ":ADDR:" strings when entering data at a prompt. The program uses these strings internally to find your input, so if you type over them, the program will get confused trying to isolate the actual input from within the input string. The program uses the SRCH algorithm described above to locate the exact item you wish to edit. When you have the exact item you wish to edit on the screen, press PICK and you will have a chance to make your changes. Again, the entire list can be viewed by specifying an asterisk as the search string. Note: When you press PICK, you will be prompted to edit either the name/number or name/address, depending on whether the number or address was being displayed when you pressed PICK. This goes for deleting entries as well. Any time you see an EXIT option on the menu bar, you can press it to back out of the program. Sometimes it backs you out one menu level, and sometimes you exit the program entirely. I tried to handle each case in the most natural way, rather than always doing the same thing. I hope you agree that this was the way to go. Some usage notes: I intentionally had the output of the SEARCH algorithm appear above the bottom of the display so there would be room for multiple lines of text in the :NUMBER: field. This facilitates including home and work phone numbers for people in this field on two lines. Just insert a line feed when entering/editing the entries. The same goes for the ":ADDR:" field; use line feeds to separate lines of text in the address. Anyway, here's version 1.4 of the program. I hope you like it. The comments will automatically strip out when you download to your calculator. Enjoy, and please give me your comments, and any ideas you have for new features. Regards, >>>Joe Ervin