10 REM *** LOG.BAS *** by Wayne Leman,KL7FDQ 6/24/83
20 DIM LISTCALL$(300)
30 DIM LISTQTH$(100)
40 ON ERROR GOTO 430
50 OPEN "I",#1,"LOG.DAT"
60 REM IF FILE EXISTS, WRITE IT TO "COPY"
70 OPEN "O",#2,"COPY"
80 IF EOF(1) THEN 120
90 LINE INPUT #1,A$
100 PRINT #2,A$
110 GOTO 80
120 CLOSE #1
130 KILL "LOG.DAT"
140 REM ADD NEW ENTRIES TO FILE
150 INPUT "NEW DATE?  Y or CR";Q$
160 IF Q$="" THEN 180
170 INPUT "NEW DATE";ND$
180 INPUT "TIME";TIME$
190 INPUT "STATION WORKED";C$
200 IF C$ = "DONE" THEN 400
210 REM CHECK FOR DUPES
220 GOSUB 460
230 N=N+1
240 INPUT "RST SENT";SENT$
250 INPUT "REPORT RECEIVED";RCVD$
260 INPUT "STATE, PROVINCE, OR COUNTRY";QTH$
270 REM CHECK FOR NEW MULTIPLIER
280 GOSUB 520
290 INPUT "POINTS";P
300 TOTALP = TOTALP + P
310 SCORE=M*TOTALP
320 PRINT #2,ND$;",";TIME$;",";CHR$(34);
330 PRINT #2,USING "\         \";C$;
340 PRINT #2,CHR$(34);",";SENT$;"MONT,";CHR$(34);
350 PRINT #2,USING "\         \";RCVD$;
360 PRINT #2,CHR$(34);",";CHR$(34);
370 PRINT #2,USING "\          \";NEWQTH$;
380 PRINT #2,CHR$(34);",";P;",";DUPE$;",";TOTALP;",";M;",";SCORE
390 PRINT:GOTO 150
400 CLOSE
410 REM CHANGE FILENAME BACK TO "LOG.DAT"
420 NAME "COPY" AS "LOG.DAT"
430 IF ERR=53 AND ERL=50 THEN OPEN "O",#2,"COPY":RESUME 150
440 ON ERROR GOTO 0
450 RUN "MENU"
460 LISTCALL$(N)=C$
470 FOR I=0 TO N-1
480 IF C$=LISTCALL$(I) THEN PRINT:PRINT "***DUPE***":PRINT:GOTO 510
490 NEXT I
500 DUPE$="":RETURN
510 DUPE$="DUPE":RETURN
520 LISTQTH$(M)=QTH$
530 FOR I = 0 TO M-1
540 IF QTH$ = LISTQTH$(I) THEN NEWQTH$ = "---":RETURN
550 NEXT I
560 NEWQTH$ = QTH$:M=M+1:RETURN
TH$
530 FOR I = 0 TO M-1
540 I