home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hacker Chronicles 2
/
HACKER2.BIN
/
760.LOGPRINT.2
< prev
next >
Wrap
Text File
|
1985-09-28
|
3KB
|
79 lines
10 REM LOGPRINT VER 791114
20 ERRSET 630,E1,E2
30 REM BY JOE KASSER G3ZCZ
40 REM COPYRIGHT SNOW MICRO SYSTEMS INC. 1979
50 GOSUB 5010\X=0\GOSUB5005\IFX=1THEN590
60 GOSUB 5050 \ REM GET DATA FILE NAME
70 INPUT"Scan/print whole log, by prefix or date (W, P or D ) ? ",A$
80 IFA$=""THEN70
90 P1=66 \ P2=1 \ Q3=0
100 IF A$(1,1)="W" THEN 110 ELSE 120
110 Q=3 \ GOTO 270
120 IF A$(1,1)="P" THEN 130 ELSE 150
130 INPUT"Which prefix ? ",A$\IFA$=""THEN130
140 Q=2 \ GOTO 270
150 IF A$(1,1)="D" THEN 160 ELSE 70
160 INPUT "Start Date ? ",D7
170 INPUT "Start Month (1-12) ? ",D8
180 INPUT "Start Year (19xx) ? ",D9 \ IF D9<1900 THEN 180
190 Q=1
200 INPUT "Do you only want one day ? ",A$\IFA$=""THEN200
210 IF A$(1,1)="Y" THEN 260
220 INPUT"End day ? ",D4\IFD4>31ORD4<1THEN220
230 INPUT"End Month (1-12)? ",D5\IFD5>12ORD5<1THEN230
240 INPUT"End year (19xx) ? ",D6 \ IF D6<1900 THEN 240
250 GOTO 270
260 D4 = D7 \ D5 = D8 \ D6 = D9
270 PRINT \ GOSUB 5040
280 D9=(D9-1900)*10000+D8*100+D7
290 D6=(D6-1900)*10000+D5*100+D4
300 IF N=0 THEN 610
310 GOSUB 5030
320 OPEN #1,L1$
330 FOR I=1 TO N
340 READ #1,&D1,&D2,&D3,T,F,C$,S,R,M$,P,&Q1,&Q2,X$
350 IF Q=1 THEN 440
360 IF Q=3 THEN 470
362 FORJ=1TOLEN(X$)\IFX$(J,J)<>"<"THEN363ELSEEXIT364
363 NEXT J \ GOTO 370
364 J3=J\ FOR J=J3+1 TO LEN(X$) \ IF X$(J,J)<>">" THEN365ELSEEXIT366
365 NEXT J \ GOTO 370
366 C2$=X$(J3+1,J-1)
368 IF LEN(C2$)<LEN(A$)THEN370
369 IF C2$(1,LEN(A$))=A$ THEN470
370 IF LEN(C$)<LEN(A$) THEN 430
380 FORJ=1TO LEN(C$)\ IF C$(J,J)="/"THENEXIT400
390 NEXT\ GOTO420
400 C1$=C$(J+1,LEN(C$)) \ IFLEN(C1$)=1 THEN 420
410 IF LEN(C1$)<LEN(A$)THEN420
415 IFC1$(1,LEN(A$))=A$ THEN 470
420 IF C$(1,LEN(A$))=A$ THEN 470
430 IF Q=2 THEN 480
440 D0=D3*10000+D2*100+D1
450 IF D0<D9 THEN 480
460 IF D0>D6 THEN EXIT 490
470 GOSUB 5020 \Q3=1\REM PRINT LINE OF DATAè480 NEXT
490 CLOSE#1
500 IF Q=2 THEN 510 ELSE 520
510 IFQ3=1THEN560ELSEPRINTA$," was not in the log"\PRINT
520 IF Q=1 THEN 530 ELSE 540
530 IF Q3=1 THEN 560 ELSE PRINT"No contacts on that date"\GOTO560
540 IF Q=3 THEN 550 ELSE 560
550 IF Q3=1THEN560ELSEPRINT"No contacts in the log book"
560 INPUT"Do you want log page ejected ? ",A$\IF A$="" THEN560
570 IF A$(1,1)="Y" THEN 580 ELSE 590
580 FOR I=P2 TO 62\PRINT#A\NEXT
590 INPUT"Again ? ",A$\IF A$=""THEN590
600 IFA$(1,1)="Y"THEN70ELSEIFA$(1,1)="N"THEN605ELSE590
605 GOTO 5045
610 PRINT"LOG BOOK IS EMPTY "
620 GOTO 605
630 ERRSET 630,E1,E2
640 IFE2=15THEN605
670 IF E1<>5560 THEN680 ELSE IF I>4 THEN 5570 ELSE 5565
680 IF E1<>5650 THEN 690 ELSE IF I>4 THEN 5670 ELSE 5660
690 IFE2<>8THEN 700 ELSE PRINT"HARD DISC ERROR"\GOTO605
700 IFE2<>7THEN 710 ELSE PRINT"FILE ERROR"\GOTO605
710 PRINT"ERROR ",E2," AT LINE ",E1\GOTO605
5000 REM SUBROUTINE PACKAGE VER 790908