home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HAM Radio 1
/
HamRadio.cdr
/
log
/
g3zcz15
/
cklstgen.2
next >
Wrap
Text File
|
1985-09-28
|
2KB
|
66 lines
10 REM CKLSTGEN VER 820305
20 ERRSET 590,E1,E2
30 Q3=0\N1=0\N4=0 \ GOSUB 5010
40 INPUT"Name of LOG file ? ",L1$\IF L1$=""THEN 40
50 INPUT"Which drive is it on ? ",D1 \ IF D1<1ORD1>4 THEN50
55 D1$=STR$(D1) \ D1$=D1$(2,2)
60 INPUT"Do you want the check list saved on disc ? ",A$\IFA$=""THEN60
70 IF A$(1,1)="Y"THEN80 ELSE F1=1 \ GOTO 170
80 INPUT"What is the name of the check list file ? ",L2$\IF L2$=""THEN80
90 IF LEN(L2$)<8THEN100ELSE!"LENGTH ERROR (max is 7)"\GOTO80
100 IF L1$<>L2$ THEN110 ELSE PRINT"FILE NAME ERROR"\GOTO80
110 INPUT"Which drive do you want it put on ? ",D2 \ IF D2<1ORD2>4 THEN110
120 F1=0
130 D2$=STR$(D2) \ D2$=D2$(2,2)
140 IF FILE(L2$+","+D2$)=2 THEN 160 ELSE 150
150 IF FILE(L2$+","+D2$)=3 THEN 160 ELSE 170
160 PRINT"FILE ",L2$," ALREADY EXISTS ON DRIVE ",D2$\GOTO 80
170 OPEN#0,"*"+L1$+","+D1$ \ READ#0,N1 \ CLOSE#0
180 PRINT"There are ",N1," entries in ",L1$
190 IF F1=1 THEN210
200 CREATE L2$+","+D2$ , INT(N1*12/256)+1
210 OPEN#0,L1$+","+D1$ \ REM OPEN OLD LOG FILE
220 DIM W$(N1*10),B1(N1)
230 FOR X=0 TO N1-1
240 GOSUB 5025 \REM READ ENTRY
250 PRINT X+1,TAB(5),C$
260 W$(X*10+1,X*10+10) = C$
270 NEXT X
280 PRINT "CHECK LIST LOADED"
290 GOSUB 430
300 FOR I=0 TO N1-1
310 D$=W$(I*10+1,I*10+10)
320 PRINT D$
330 NEXT I
340 IF F1=1 THEN 410
350 OPEN #2,L2$+","+D2$
360 FOR I=0 TO N1-1
370 WRITE #2,W$(I*10+1,I*10+10)
380 NEXT
390 WRITE #2,"-*-"
400 CLOSE#2
410 GOTO 5045
420 GOTO 5550 \ REM GET STNDATA
430 PRINT"STARTING TO SORT"
440 N9=1
450 C=0\FORI=N1-1TO N9 STEP -1
460 IFW$((I-1)*10+1,(I-1)*10+10)<W$(I*10+1,I*10+10)THEN500
470 A$=W$((I-1)*10+1,(I-1)*10+10)
480 W$((I-1)*10+1,(I-1)*10+10)=W$(I*10+1,I*10+10)
490 W$(I*10+1,I*10+10)=A$ \ C=1 \B2=B1(I-1)\B1(I-1)=B1(I)\B1(I)=B2
500 NEXT \IFC=0THEN510 ELSE N9=N9+1\!N9,\IF N9/20=INT(N9/20)THEN!\GOTO450
510 PRINT"SORT OVER"
520 RETURN
530 FOR I = 1 TO 4è540 IF FILE("SYSTEM,"+STR$(I))=2 THEN EXIT 560
550 NEXT \ GOTO 570
560 CHAIN "SYSTEM,"+STR$(I)
570 PRINT"put a system disc in any drive, then hit 'RETURN'"
580 INPUT" ",A$ \ GOTO 530
590 ERRSET 590,E1,E2
600 IF E2=15THEN530
610 IFE1=540 THENIFI<1ORI>4THEN570ELSE550
620 IFE2<>7THEN630ELSEPRINT"FILE ERROR"\GOTO530
630 IFE2<>8THEN640ELSEPRINT"HARD DISC ERROR"\GOTO530
640 PRINT"ERROR ",E2," AT LINE ",E1\GOTO530
5000 REM SUBROUTINE PACKAGE VER 790817