Telephonel

primarily intended for generation of labels, but can also be used to change the order of the fields in a printout.

The final printout command is designed to find and print all items which fall within a user-specified range. This command requests the user to select a field and input upper and lower limits. It then generates a listing of data items that fall within the search parameters.

Program Notes

While DSRS may not compete with high-priced commercial data systems, it does fill a niche for the typical home user. The memory-resident data file provides for relatively fast manipulation of data, and the 25K data file size is more than sufficient for most home uses.

The listing of DSRS is heavily commented and contains notes on details of operation. The comments, of course, should be removed when typing in the program. As with similar systems, the performance of this system depends a great deal on the user. This is particularly true when data is to be recovered by the use of search commands. The INSTR function of BASIC is used to determine matches, so keywords should be chosen carefully. Any entry which has a word which matches the keyword, or which contains the keyword as part of a larger word, will be flagged by a search. To increase selectivity, a keyword may have a space added in front of it, or behind it, or both, to prevent matches with words larger than the keyword.

To increase efficiency, the lineinput command is used for all data entry, and allows punctuation to be used within a field. As an example, city, state and zip could be the name of a single field, and the city, state, and zip code could be entered with commas separating the items. One must be careful, however, since the field is still treated as a single item and cannot be broken down further, which means you could not generate a listing only of cities, states or zips. Separate listings would reqiiire separate fields for each item.

DSRS has a capability to be used as a small database system if the user wants to go to the trouble of creating a descriptor field for each item. An example of this would be the addition of a descriptor field to our title, author, subject file. The descriptor field would contain key words and phrases which would describe the contents of the book. As an example, several books on electronics might be included in the file. Some books might be primarily computer electronics, while others might concentrate on radio. The addition of selected words and phrases would allow a search to be performed on the descriptor field, which would result in only those books associated with computer electronics to be flagged. Employing techniques such as this can considerably expand the usefulness of this program beyond simple recordkeeping.

One last note. If, because of an error or faulty entry, you get bumped out of a command before saving the file, executing a "save data file" command upon re-entering the command selection mode will save whatever entries or modifications you have made to the data file.

How To Enter Our Listings

Our program listings come directly from the submissions of our authors We do not edit them at all (that's why you sometimes see spelling errors in them) We run all submissions and make sure that they do work

To enter one of the listings given make sure you have the type of computer specified and all necessary programs, operating systems, or hardware that the program uses Type in the program exactly as it appears in the magazine Be extra careful so you do not confuse 0 (zero) with O or 1 (one) with I or L Save the program to tape or disk before running It. On long programs It Is wise to save It as you go along, thus protecting yourself from having to re-enter the whole program If the lights go out.

Here are some tips to help you catch errors that you may have made In typing If you get an out of data error, the problem lies in the DATA statements, rarely in the READ line that the computer refers to Check all DATA lines to see that they are correct and that no commas or values are missing It might be useful to print each variable after it is read, that way you can follow the computer as It goes through the data Just insert a PRINT variable right after the READ variable command

Many of our authors use a linefeed, or downarrow, in their programs If you see lines of code that have many blank spaces and then they begin again on the next line with more code, a linefeed was used Even If you don't use them, the program will run but the video display may be messed up

You will find the TRON command helpful In following the program's logic By turning the trace command on, TRON, you can see what lines are being executed by the program It is very useful in catching GOTO or GOSUB errors and Incorrect references to linenumbers Don't worry about video formatting when the trace is on, it will be quite messy

If you find yourself getting TM or type mismatch errors, check carefully the use of the $ symbol Also look at the beginning of the program to see If you correctly entered the DEFINT or DEFSTR statements

Function call errors usually occur when a variable has a value that is not allowed Check all variables that are being used by the function, one of them probably has the wrong value

If after all that, you can't get It to run, send us a paper listing of your program, what systems you are running it on, and carefully document the error you are getting We will do what we can to find the flaw It Is very difficult for us to try to help you debug errors over the phone Check Letters and Notes, etc in the next few issues for updates or conversions Many times a reader will tell how to embellish a previously published program

100 GOSUB272011 SET UP ERROR HANDLER

110 CLS % PRINT "DATA STORAGE AND RETRIEVA

L SYSTEM": PRINTs PRINT"BY GARY SMALL, 198

120 GOTO1720S 'GO TO COMMAND SELECTION MO

0 0

Post a comment