★ APPLICATIONS ★ DIVERS ★ CONLOG ★ |
Conlog | Applications Divers |
]
Another excellent program from J. Rahmann. Brisbane. Conlog is for Radio Hams to keep a record of contacts logged in their various contests. As it stands it is really only of use to Radio Amateurs and they will need no prompts from me to understand the information it requires and saves. It is extremely well documented with REM instructions so load and type list -9. For those not involved in Amateur Radio please do not pass this by. John has used an extremely interesting method of saving his data directly into the program as DATA statements, which is well worth studying and possibly adapting to your own personal needs. As the program stands it saves data for 5 different "Radio Bands" and for simplicity the actual working bit of code has been repeated for the five bands, so you need only study the code up to line 420 to follow his logic. Simply what John has done is as the data has come in he has built it into a string and then assigned it to a key using the KEY function. See lines: - 100 o= 5002 : Rem this sets a program line counter 110 Q$= STR$(o) : Rem convert it into a string 120 O$ = Q$+"DATA"+CHR$(32): Rem O$ now contains current line number, the word DATA and a space. If you jump now for a moment to line 400. All the data has been gathered and it is finally concatenated together into X$, first O$ which contains the line number and the word DATA and space then each piece of data held in a string seperated by CHR$(44) < which is ascii for the comma > Line 410 defines the 4 key to hold X$ as its contents. Back in line 170 the 0 key has been defined to contain "GOTO 110"+ the value for ENTER. So when the program now strikes line 420 and drops into basic ready, one press of the 4 key writes the assembled program line into it's correct position in the program and a press of the 0 key returns the user straight back into the program. John has programmed other keys to do all sorts of other functions for him as well such as switching to different bands etc. The idea is so simple it is brilliant. O.K. I can hear the purists saying one should never allow a program to fall into BASIC READY (suppose the program drops into basic ready and the unwary being unaware attempts to enter the value of say 100, program line 100 will be deleted and the entire program corrupted). This is a very valid objection particularly if others are going to use the program, but providing you are aware of the dangers involved it is a simple effective way to permenantly modify your running program. The program would of course have to be SAVED at the end of a session or the data would all be lost on switch off.
|