home *** CD-ROM | disk | FTP | other *** search
- 10 ' CQWWLOG.BAS version 1.2 - Copyright (C) 1986,1987 by Clarke Greene K1JX NOT FOR COMMERCIAL USE
- 20 '
- 30 ' This Microsoft (tm) BASIC program will build a complete log package for the CQ Worldwide DX Contest.
- 40 '
- 50 ' The file containing the log entries must be an ASCII file in the following format:
- 60 ' (each band requires a separate log entry file)
- 70 '
- 80 ' TIME CALLSIGN RCV'D REPORT (each log entry must be followed by a carriage return)
- 90 '
- 100 ' At least one space must be between each field of each log entry. Only a changed digit in the time field must
- 110 ' be present; for example, if the contest begins at 1800Z and the first contact is made at 1802Z and the second
- 120 ' contact is made at 1805Z, then only 5 need be entered in the time field. If the third contact is made at
- 130 ' 1812Z, then 12 should be entered in the time field. If the next contact is made at 1812Z, then no number need be
- 140 ' entered in the time field (however, be sure to enter a space to indicate separation between fields).
- 150 '
- 160 ' These files will be produced:
- 170 ' <filename>.LOG - this is a complete log ready for printing
- 180 ' <filename>.DUP - this is a sorted duplicate listing ready for printing
- 190 ' <filename>.SUM - this is a summary sheet ready for printing
- 200 '
- 210 '
- 220 ' Depending on the version of BASIC for your particular machine, the CLS (Clear Screen) command must
- 230 ' be changed. Consult your own computer's BASIC documentation for more information.
- 240 '
- 250 '
- 260 ' If compiling (a VERY good idea for several orders of magnitude improvement in speed), use O and E switches
- 270 '
- 280 ' This program also uses a prefix library file (DXPREFIX.LIB), which MUST be on the same disc (and in the
- 290 ' same subdirectory) as this program.
- 300 '
- 310 '
- 320 WARNING$="Copyrigh⌠ (C⌐ 1986,198╖ b∙ Clarkσ Greenσ K1J╪ NO╘ FO╥ COMMERCIA╠ USE"
- 330 '
- 340 ' Define arrays and variables
- 350 DEFINT A-Z : OPTION BASE 1
- 360 DIM ENTRY$(1500), MULT$(175), PFX$(900), CTRY$(900), CNT$(900), WIERDPFX$(50), WIERDCTRY$(50), WIERDCNT$(50), AMBCTRY$(10)
- 370 DIM Q(175), ZONE(40)
- 380 BLANK$=" " : BL$="" : SLANT$="/" : TRUE=-1
- 390 DUPE1$=" - Duplica" : DUPE2$="te QSO -"
- 400 ' Define format strings for printouts
- 410 LOGFORM$=" \ \ \ \ \ \ \ \ \ \ \ \\ \ #"
- 420 DUPFORM$=" \ \ \ \ \ \ \ \ \ \"
- 430 SUMFORM$=" \ \ \ \ \ \ \ \ \ \"
- 440 FOOTFORM$=" ## ## ## ###"
- 450 '
- 460 CLS
- 470 PRINT TAB(26) "CQWW DX Contest Log Processor" : PRINT : PRINT
- 480 '
- 490 ' Read Prefix table file
- 500 PRINT TAB(5) "Reading prefix library... ";
- 510 I=0 ' initialize array subscript
- 520 OPEN "DXPREFIX.LIB" FOR INPUT AS #1
- 530 WHILE NOT EOF(1)
- 540 I=I+1
- 550 INPUT #1, PFX$(I), DUMMY$, CTRY$(I), CNT$(I) ' DUMMT$ is a dummy variable for data not used
- 560 WEND
- 570 CLOSE
- 580 TABLESIZE=I ' prefix table length
- 590 PRINT "done"
- 600 '
- 610 ' Get user input
- 620 PRINT : PRINT TAB(5) "What is the station callsign? ";
- 630 INPUT "", MYCALL$
- 640 THISENTRY$=MYCALL$ : IF INSTR(THISENTRY$,SLANT$)>0 THEN GOSUB 3130 ELSE THISPFX$=LEFT$(THISENTRY$,4)
- 650 GOSUB 3260 : IF NOT INLIST THEN GOSUB 3400
- 660 MYCTRY$=THISCTRY$ : MYCNT$=THISCNT$ : IF MYCNT$="NA" THEN MYCNTPTS=2 ELSE MYCNTPTS=1
- 670 PRINT : PRINT TAB(5) "What is the station's WAZ zone? ";
- 680 INPUT "", MYZONE$
- 690 IF VAL(MYZONE$)<1 OR VAL(MYZONE$)>40 THEN PRINT CHR$(7);: GOTO 670
- 700 IF VAL(MYZONE$)<10 AND LEN(MYZONE$)=1 THEN MYZONE$="0"+MYZONE$
- 710 PRINT : PRINT TAB(5) "What is the beginning date of the contest? <dd/mm/yr> ";
- 720 INPUT "", STARTDATE$
- 730 MARK=INSTR(STARTDATE$,"/") : IF MARK=0 THEN MARK=INSTR(STARTDATE$,"-")
- 740 STARTDAY=VAL(LEFT$(STARTDATE$,MARK-1))
- 750 STARTDATE$=RIGHT$(STARTDATE$,LEN(STARTDATE$)-MARK)
- 760 MARK=INSTR(STARTDATE$,"/") : IF MARK=0 THEN MARK=INSTR(STARTDATE$,"-")
- 770 MON=VAL(LEFT$(STARTDATE$,MARK-1))
- 780 IF MON=10 THEN MON$=" Oct. " : RST$="59" ELSE MON$=" Nov. " : RST$="599"
- 790 SENT$=RST$+MYZONE$
- 800 YR$=RIGHT$(STARTDATE$,LEN(STARTDATE$)-MARK)
- 810 PRINT : PRINT TAB(5) "What is the GMT starting time for the contest? ";
- 820 INPUT "", STARTGMT$
- 830 PRINT : PRINT TAB(5) "What file is the log extract located in? ";
- 840 INPUT "", INFILE$ : GOSUB 2940 ' check to see if file is valid
- 850 IF INSTR(INFILE$,".")<>0 THEN OUTFILE$=LEFT$(INFILE$,INSTR(INFILE$,".")-1) ELSE OUTFILE$=INFILE$
- 860 PRINT : PRINT TAB(5) "What frequency band is the log extract for? ";
- 870 INPUT "", BAND$
- 880 '
- 890 ' Build log file
- 900 CLS
- 910 PRINT : PRINT TAB(5) "Duping and counting... ";
- 920 '
- 930 ' Clear arrays
- 940 FOR I=1 TO 1500
- 950 ENTRY$(I)=BL$
- 960 NEXT I
- 970 FOR I=1 TO 175
- 980 MULT$(I)=BL$
- 990 Q(I)=1
- 1000 NEXT I
- 1010 FOR I=1 TO 40
- 1020 ZONE(I)=0
- 1030 NEXT I
- 1040 '
- 1050 ' Initialize variables
- 1060 RAWTOTAL=0 : QSOS=0 : DUPES=0 : CTRYNR=0 : ZONENR=0 : TOTPOINTS=0
- 1070 PGQSOS=0 : PGZONES=0 : PGCTRY=0 : PGPTS=0
- 1080 DAY=STARTDAY : PREVIOUSGMT$=STARTGMT$
- 1090 '
- 1100 ' Open input file and output .LOG file
- 1110 OPEN INFILE$ FOR INPUT AS #1
- 1120 OPEN OUTFILE$+".LOG" FOR OUTPUT AS #2
- 1130 '
- 1140 ' Input data, process, and enter into output file
- 1150 WHILE NOT EOF(1)
- 1160 LINE INPUT #1, THISENTRY$ ' read entire line from disc file
- 1170 WHILE ASC(RIGHT$(THISENTRY$,1))<48 AND LEN(THISENTRY$)>0
- 1180 THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1) ' strip off trailing spaces,etc
- 1190 WEND
- 1200 IF LEN(THISENTRY$)>0 THEN RAWTOTAL=RAWTOTAL+1 ELSE GOTO 1870
- 1210 '
- 1220 ' Separate received report from THISENTRY$
- 1230 RCVD$=BL$ ' initialize RCVD$ to be null string
- 1240 WHILE ASC(RIGHT$(THISENTRY$,1))>=48
- 1250 RCVD$=RIGHT$(THISENTRY$,1)+RCVD$
- 1260 THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1) ' parse last character of string
- 1270 WEND
- 1280 IF LEN(RCVD$)<=2 THEN RCVD$=RST$+RCVD$ ' if no RST was typed, append std report
- 1290 IF LEN(RCVD$)<(LEN(RST$)+2) THEN RCVD$=LEFT$(RCVD$,LEN(RST$))+"0"+RIGHT$(RCVD$,1)
- 1300 WHILE ASC(RIGHT$(THISENTRY$,1))<48
- 1310 THISENTRY$=LEFT$(THISENTRY$,LEN(THISENTRY$)-1) ' strip off trailing spaces,etc
- 1320 WEND
- 1330 '
- 1340 ' Separate GMT from THISENTRY$
- 1350 WHILE ASC(LEFT$(THISENTRY$,1))<48
- 1360 THISENTRY$=RIGHT$(THISENTRY$,LEN(THISENTRY$)-1) ' strip off leading spaces
- 1370 WEND
- 1380 IF INSTR(THISENTRY$,BLANK$)<>0 THEN GMT$=LEFT$(THISENTRY$,INSTR(THISENTRY$,BLANK$)-1) ELSE GMT$=BL$
- 1390 THISENTRY$=RIGHT$(THISENTRY$,(LEN(THISENTRY$)-LEN(GMT$)))
- 1400 WHILE LEFT$(THISENTRY$,1)=BLANK$
- 1410 THISENTRY$=RIGHT$(THISENTRY$,LEN(THISENTRY$)-1) ' strip off leading spaces
- 1420 WEND
- 1430 ' Fill in missing time data
- 1440 GMT$=LEFT$(PREVIOUSGMT$,(4-LEN(GMT$)))+GMT$
- 1450 THEDATE$=BL$ : IF GMT$<PREVIOUSGMT$ THEN DAY=DAY+1 : THEDATE$=STR$(DAY)+MON$
- 1460 '
- 1470 ' Check for dupes
- 1480 DUPE.QSO=NOT TRUE : POINTS=3
- 1490 FOR J=1 TO QSOS
- 1491 IF LEN(ENTRY$(J))<>LEN(THISENTRY$) GOTO 1510
- 1500 IF ENTRY$(J)=THISENTRY$ THEN NEWZONE$=DUPE1$ : NEWCTRY$=DUPE2$ : DUPES=DUPES+1 : POINTS=0 : DUPE.QSO=TRUE : J=QSOS
- 1510 NEXT J
- 1520 IF DUPE.QSO GOTO 1820 ' skip over prefix search if this entry is a dupe
- 1530 QSOS=QSOS+1 : ENTRY$(QSOS)=THISENTRY$
- 1540 '
- 1550 ' Determine zone and search zone table for new multiplier
- 1560 NEWZONE$=BL$
- 1570 THISZONE$=RIGHT$(RCVD$,2)
- 1580 J=VAL(THISZONE$) : IF J<1 OR J>40 THEN GOSUB 3050
- 1590 IF ZONE(J)=0 THEN ZONENR=ZONENR+1 : NEWZONE$="Zone #"+STR$(ZONENR) : PGZONES=PGZONES+1
- 1600 ZONE(J)=ZONE(J)+1
- 1610 '
- 1620 ' Determine prefix and search prefix library for contact country and continent
- 1630 IF INSTR(THISENTRY$,SLANT$)>0 THEN GOSUB 3130 ELSE THISPFX$=LEFT$(THISENTRY$,4)
- 1640 GOSUB 3260 : IF NOT INLIST THEN GOSUB 3400 : PRINT TAB(5) "Back to duping and counting... ";
- 1650 IF ASC(THISCTRY$)<48 THEN GOSUB 3640 ' resolve ambiguous prefix
- 1660 '
- 1670 ' Search multiplier table for new country
- 1680 NEWMULT=TRUE : NEWCTRY$=BL$
- 1690 FOR J=1 TO CTRYNR
- 1700 IF MULT$(J)=THISCTRY$ THEN Q(J)=Q(J)+1 : NEWMULT=NOT TRUE : J=CTRYNR
- 1710 NEXT J
- 1720 IF NEWMULT THEN CTRYNR=CTRYNR+1 : MULT$(CTRYNR)=THISCTRY$ : NEWCTRY$=THISCTRY$+" #"+STR$(CTRYNR) : PGCTRY=PGCTRY+1
- 1730 '
- 1740 ' Determine point value for QSO
- 1750 IF THISCTRY$=MYCTRY$ THEN POINTS=0 : GOTO 1780 ' contacts in your own country are worth 0 points
- 1760 IF THISCNT$=MYCNT$ THEN POINTS=MYCNTPTS
- 1770 '
- 1780 ' Update page totals
- 1790 PGQSOS=PGQSOS+1 : PGPTS=PGPTS+POINTS
- 1800 TOTPOINTS=TOTPOINTS+POINTS
- 1810 '
- 1820 ' Write entry to file
- 1830 IF (RAWTOTAL-1) MOD 50=0 THEN GOSUB 3860 ' print header if this is the beginning of a page
- 1840 PRINT #2, USING LOGFORM$; THEDATE$; GMT$; THISENTRY$; SENT$; RCVD$; NEWZONE$; NEWCTRY$; POINTS
- 1850 IF RAWTOTAL MOD 50=0 THEN GOSUB 3930 ' print footer if this is the end of a page
- 1860 PREVIOUSGMT$=GMT$ : GMT$=BL$
- 1870 WEND
- 1880 IF RAWTOTAL MOD 50<>0 THEN PRINT#2, CHR$(12) ' if a form feed hasn't been printed, print one now
- 1890 CLOSE
- 1900 PRINT "done"
- 1910 '
- 1920 ' Build dupe sheet
- 1930 PRINT : PRINT TAB(5) "Preparing dupe sheet... ";
- 1940 ' Sort callsigns for dupe sheet
- 1950 M=QSOS\2
- 1960 WHILE M>0
- 1970 FOR I=M+1 TO QSOS
- 1980 J=I-M
- 1990 WHILE J>0
- 2000 IF ENTRY$(J)>ENTRY$(J+M) THEN SWAP ENTRY$(J),ENTRY$(J+M) : J=J-M ELSE J=0
- 2010 WEND
- 2020 NEXT I
- 2030 M=M\2
- 2040 WEND
- 2050 '
- 2060 ' Enter dupe sheet into file
- 2070 OPEN OUTFILE$+".DUP" FOR OUTPUT AS #1
- 2080 IF QSOS MOD 250=0 THEN LASTPAGE=QSOS\250 ELSE LASTPAGE=QSOS\250+1
- 2090 FOR PAGE=1 TO LASTPAGE
- 2100 PRINT #1, SPC(20-(LEN(MYCALL$)+LEN(BAND$))/2); MYCALL$; " -- Dupe Sheet for ";
- 2110 PRINT #1, BAND$; " MHz Band -- Page"; STR$(PAGE)
- 2120 PRINT #1, BL$ : PRINT #1, BL$
- 2130 FOR ROW=1 TO 50
- 2140 E=(PAGE-1)*250+ROW
- 2150 PRINT #1, USING DUPFORM$; ENTRY$(E); ENTRY$(E+50); ENTRY$(E+100); ENTRY$(E+150); ENTRY$(E+200)
- 2160 NEXT ROW
- 2170 PRINT #1, CHR$(12) ' go to next page
- 2180 NEXT PAGE
- 2190 CLOSE
- 2200 PRINT "done"
- 2210 '
- 2220 ' Build summary listing
- 2230 PRINT : PRINT TAB(5) "Preparing summary sheet... ";
- 2240 ' Sort countries for summary sheet
- 2250 M=CTRYNR\2
- 2260 WHILE M>0
- 2270 FOR I=M+1 TO CTRYNR
- 2280 J=I-M
- 2290 WHILE J>0
- 2300 IF MULT$(J)>MULT$(J+M) THEN SWAP MULT$(J),MULT$(J+M) : SWAP Q(J),Q(J+M) : J=J-M ELSE J=0
- 2310 WEND
- 2320 NEXT I
- 2330 M=M\2
- 2340 WEND
- 2350 '
- 2360 ' Append number of qsos per country onto country prefixes
- 2370 FOR I=1 TO CTRYNR
- 2380 MULT$(I)=MULT$(I)+SPACE$(6-LEN(MULT$(I)))+" -"+STR$(Q(I))
- 2390 NEXT I
- 2400 '
- 2410 ' Enter country listing into file
- 2420 OPEN OUTFILE$+".SUM" FOR OUTPUT AS #1
- 2430 PRINT #1, SPC(12-(LEN(MYCALL$)+LEN(BAND$))/2); MYCALL$; " -- Summary Sheet for "; BAND$;
- 2440 PRINT #1, " MHz Band - "; YR$; " CQWW DX Contest"
- 2450 PRINT #1, BL$
- 2460 PRINT #1, TAB(15); "Country Listing and number of contacts per Country"
- 2470 PRINT #1, BL$ : PRINT #1, BL$
- 2480 IF CTRYNR MOD 5=0 THEN LASTROW=CTRYNR\5 ELSE LASTROW=CTRYNR\5+1
- 2490 FOR ROW=1 TO LASTROW
- 2500 PRINT #1, USING SUMFORM$; MULT$(ROW); MULT$(ROW+LASTROW); MULT$(ROW+LASTROW*2); MULT$(ROW+LASTROW*3); MULT$(ROW+LASTROW*4)
- 2510 NEXT ROW
- 2520 '
- 2530 ' Build listing of zones worked and contacts per zone
- 2540 J=0
- 2550 FOR I=1 TO 40
- 2560 IF ZONE(I)>0 THEN J=J+1 : MULT$(J)="Zone"+STR$(I)+" -"+STR$(ZONE(I))
- 2570 NEXT I ' put zone count into array
- 2580 FOR I=J TO 40
- 2590 MULT$(I)=BL$
- 2600 NEXT I ' blank out remainder of array
- 2610 '
- 2620 ' Enter zone listing
- 2630 PRINT #1, BL$
- 2640 PRINT #1, TAB(18); "Zone Listing and number of contacts per Zone"
- 2650 PRINT #1, BL$
- 2660 IF ZONENR MOD 5=0 THEN LASTROW=ZONENR\5 ELSE LASTROW=ZONENR\5+1
- 2670 FOR ROW=1 TO LASTROW
- 2680 PRINT #1, USING SUMFORM$; MULT$(ROW); MULT$(ROW+LASTROW); MULT$(ROW+LASTROW*2); MULT$(ROW+LASTROW*3); MULT$(ROW+LASTROW*4)
- 2690 NEXT ROW
- 2700 '
- 2710 ' Enter summary into file
- 2720 PRINT #1, BL$ : PRINT #1, BL$
- 2730 PRINT #1, " Total Valid QSOs - "; STR$(QSOS); " Dupes - "; STR$(DUPES)
- 2740 PRINT #1, " QSO points - "; STR$(TOTPOINTS)
- 2750 PRINT #1, " Zones - "; STR$(ZONENR)
- 2760 PRINT #1, " Countries - "; STR$(CTRYNR)
- 2770 CLOSE
- 2780 PRINT "done"
- 2790 '
- 2800 ' Print results
- 2810 CLS : PRINT CHR$(7)
- 2820 PRINT : PRINT TAB(5) "Results for the "; BAND$; " MHz band"
- 2830 PRINT : PRINT TAB(8) "Valid QSOs: "; QSOS
- 2840 PRINT : PRINT TAB(8) "Duplicate QSOs: "; DUPES
- 2850 PRINT : PRINT TAB(8) "QSO points: "; TOTPOINTS
- 2860 PRINT : PRINT TAB(8) "Zones: "; ZONENR
- 2870 PRINT : PRINT TAB(8) "Countries: "; CTRYNR
- 2880 PRINT : PRINT : PRINT
- 2890 PRINT TAB(5) "Type C to continue with another band for this contest,"
- 2900 PRINT : PRINT TAB(5) "or any other key to Exit ";
- 2910 ANS$=INPUT$(1)
- 2920 IF ANS$="C" OR ANS$="c" THEN CLS : GOTO 830 ELSE CLS : SYSTEM
- 2930 '
- 2940 ' Subroutine to trap missing file
- 2950 ON ERROR GOTO 3000
- 2960 OPEN INFILE$ FOR INPUT AS #1 ' try opening file
- 2970 ON ERROR GOTO 0
- 2980 CLOSE
- 2990 RETURN
- 3000 PRINT CHR$(7) : PRINT TAB(4) "That file does not exist - type X to Exit or any other key to continue ";
- 3010 ANS$=INPUT$(1) : IF ANS$="X" OR ANS$="x" THEN CLS : SYSTEM
- 3020 PRINT
- 3030 RESUME 830
- 3040 '
- 3050 ' Subroutine to clear up impossible zone number
- 3060 PRINT CHR$(7) : PRINT
- 3070 PRINT TAB(5) "The zone for "; THISENTRY$; " ["; THISZONE$; "] must be incorrect."
- 3080 PRINT : PRINT TAB(8) "What is the correct zone number? ";
- 3090 INPUT "", THISZONE$ : J=VAL(THISZONE$)
- 3100 IF J<1 OR J>40 GOTO 3060
- 3110 PRINT : PRINT TAB(5) "Back to duping and counting... ";
- 3120 RETURN
- 3130 '
- 3140 ' Subroutine to determine prefix from portable designator
- 3150 MARK=INSTR(THISENTRY$,SLANT$)
- 3160 IF MARK>3 THEN THISPFX$=RIGHT$(THISENTRY$,LEN(THISENTRY$)-MARK) ELSE THISPFX$=LEFT$(THISENTRY$,MARK-1)
- 3170 IF LEN(THISPFX$)>1 GOTO 3240 ' have prefix - return
- 3180 IF ASC(THISPFX$)>58 OR ASC(THISPFX$)<47 THEN THISPFX$=LEFT$(THISENTRY$,4) : GOTO 3240 ' (local portable designator)
- 3190 K=2 ' find position of first numeral in call
- 3200 WHILE (ASC(MID$(THISENTRY$,K,1))>57 OR ASC(MID$(THISENTRY$,K,1))<48) AND K<LEN(THISENTRY$)
- 3210 K=K+1
- 3220 WEND
- 3230 THISPFX$=LEFT$(THISENTRY$,K-1)+THISPFX$ ' new prefix = portable number in old prefix
- 3240 RETURN
- 3250 '
- 3260 ' Subroutine to search prefix library for standard country prefix and continent
- 3270 K=4 : INLIST=NOT TRUE : SAVEDPFX$=THISPFX$
- 3280 WHILE K>0 AND INLIST=NOT TRUE
- 3290 THISPFX$=LEFT$(THISPFX$,K)
- 3300 LOW=1 : HIGH=TABLESIZE : INLIST=NOT TRUE ' initial values for binary sort
- 3310 WHILE LOW<=HIGH AND INLIST=NOT TRUE
- 3320 L=(LOW+HIGH)\2
- 3330 IF THISPFX$=PFX$(L) THEN INLIST=TRUE : THISCTRY$=CTRY$(L) : THISCNT$=CNT$(L)
- 3340 IF THISPFX$<PFX$(L) THEN HIGH=L-1 ELSE LOW=L+1
- 3350 WEND
- 3360 K=K-1
- 3370 WEND
- 3380 RETURN
- 3390 '
- 3400 ' Subroutine to search unusual prefix list
- 3410 IF NRWIERDPFX=0 GOTO 3510 ' if the supplementary prefix list is empty, skip ahead
- 3420 K=4
- 3430 WHILE K>0
- 3440 SAVEDPFX$=LEFT$(SAVEDPFX$,K)
- 3450 FOR J=1 TO NRWIERDPFX
- 3460 IF SAVEDPFX$=WIERDPFX$(J) THEN INLIST=TRUE : THISCTRY$=WIERDCTRY$(J) : THISCNT$=WIERDCNT$(J) : J=NRWIERDPFX : K=1
- 3470 NEXT J
- 3480 K=K-1
- 3490 WEND
- 3500 IF INLIST THEN RETURN ' if the prefix was found, return
- 3510 ' Routine to get prefix definition and continent from user for prefix not found in library
- 3520 PRINT CHR$(7) : PRINT
- 3530 PRINT TAB(5) "The prefix for "; THISENTRY$; " can't be found in the prefix library."
- 3540 PRINT : PRINT TAB(8) "What is the callsign prefix? ";
- 3550 INPUT "", HELDPFX$
- 3560 PRINT : PRINT TAB(8) "What standard prefix is that equivalent to? ";
- 3570 INPUT "", THISPFX$
- 3580 GOSUB 3260 : IF NOT INLIST GOTO 3520
- 3590 NRWIERDPFX=NRWIERDPFX+1 : WIERDPFX$(NRWIERDPFX)=HELDPFX$
- 3600 WIERDCTRY$(NRWIERDPFX)=THISCTRY$ : WIERDCNT$(NRWIERDPFX)=THISCNT$
- 3610 PRINT
- 3620 RETURN
- 3630 '
- 3640 ' Subroutine to resolve ambiguous prefix with user interaction
- 3650 THISCTRY$=RIGHT$(THISCTRY$,LEN(THISCTRY$)-1) ' strip initial delimiter
- 3660 J=0
- 3670 WHILE LEN(THISCTRY$)>0
- 3680 J=J+1
- 3690 MARK=INSTR(THISCTRY$,".")
- 3700 AMBCTRY$(J)=LEFT$(THISCTRY$,MARK-1) ' put multipiler name into array
- 3710 THISCTRY$=RIGHT$(THISCTRY$,LEN(THISCTRY$)-MARK)
- 3720 WEND
- 3730 PRINT CHR$(7) : PRINT
- 3740 PRINT TAB(5) "The prefix for "; THISENTRY$; " could indicate several different countries."
- 3750 PRINT : PRINT TAB(8) "The possiblities are:" : PRINT
- 3760 FOR K=1 TO J
- 3770 PRINT TAB(11) STR$(K); ". "; AMBCTRY$(K) ' print choices to screen
- 3780 NEXT K
- 3790 PRINT : PRINT TAB(8) "Type the number of the correct country. > ";
- 3800 INPUT "", CHOICE$
- 3810 K=VAL(CHOICE$) : IF K > J OR K < 1 THEN PRINT CHR$(7); : GOTO 3790
- 3820 THISCTRY$=AMBCTRY$(K)
- 3830 PRINT : PRINT TAB(5) "Back to duping and counting... ";
- 3840 RETURN
- 3850 '
- 3860 ' Subroutine to print log sheet header
- 3870 PRINT #2, " "; MYCALL$; " "; BAND$; " MHz Log"; TAB(72); "Page"; STR$(RAWTOTAL\50+1)
- 3880 PRINT #2, " Date Time Callsign Sent Rcvd New Zone New Country Pt."
- 3890 PRINT #2, " "; STRING$(78,45)
- 3900 THEDATE$=STR$(DAY)+MON$
- 3910 RETURN
- 3920 '
- 3930 ' Subroutine to print log sheet footer
- 3940 IF RAWTOTAL MOD 50=0 GOTO 3980 ' if at the end of a page, jump ahead
- 3950 FOR J=1 TO 50-(RAWTOTAL MOD 50)
- 3960 PRINT #2, BL$
- 3970 NEXT J ' fill last page with blank lines
- 3980 PRINT #2, " "; STRING$(78,45)
- 3990 PRINT #2, " Totals for this page: Valid QSOs - ";
- 4000 PRINT #2, USING FOOTFORM$; PGQSOS; PGZONES; PGCTRY; PGPTS
- 4010 PRINT #2, CHR$(12)
- 4020 PGQSOS=0 : PGZONES=0 : PGCTRY=0 : PGPTS=0 ' reset page counts
- 4030 RETURN