Compucolor.org – Virtual Media

Listing of file='NLREAD.BAS;01' on disk='vmedia/chip_77-sector.ccvf'

1 PLOT 12,15,27,11:CLEAR 1000
2 PRINT TAB( 17)"FILE ";CHR$ (34);"NGLIST.RND;01";CHR$ (34);" READING PROGRAM"
3 PRINT :PRINT "READ NATIONAL GEOGRAPHIC INDEX FILES"
4 PRINT :INPUT "INSERT DISK CONTAINING FILE AND PRESS RETURN TO CONTINUE:";Z$
5 PLOT 12:FILE "T",42:PLOT 15:FILE "R",3,"NGLIST",2:GET 3,1;LR:IF LR< > 1THEN 7
6 PRINT "FILE INDEX EMPTY":FOR ZZ= 1TO 500:NEXT ZZ:FILE "C",3:GOTO 3
7 PRINT "THE INDEX FILE "CHR$ (34)"NGLIST.RND;1"CHR$ (34)" CONTAINS DETAILS OF "LR- 1" FILES":PRINT
8 INPUT "SELECT 1)RANGE 2)SEARCH STRING 3)END (1,2,3):";D:IF D< 1OR D> 3THEN PLOT 28,11:GOTO 8
9 D= INT (D):ON DGOTO 11,24,10
10 FILE "C",3:END
11 PRINT :PRINT "A TOTAL OF 56 FILES MAY BE DISPLAYED ON ONE PAGE"
12 PRINT :INPUT "ENTER DESIRED RANGE ( RS,RF ):";RS,RF:IF RF- RS> 55THEN PRINT :PRINT "TOO MANY!":GOTO 12
13 IF RS< 1OR RS> 1500OR RF< 1OR RF> 1500THEN PRINT :PRINT "NO SUCH RECORD!":GOTO 12
14 IF RF< RSTHEN QQ= RF:RF= RS:RS= QQ:QQ= 0
15 IF RF> LR- 1THEN PRINT :PRINT "PASSED THE END OF DATA!":GOTO 12
16 PLOT 12:PRINT "R."TAB( 7)"ARTICLE"TAB( 25)"MTH/YR"TAB( 32)"R."TAB( 38)"ARTICLE"TAB( 56)"MTH/YR":PRINT
17 FOR I= RS+ 1TO RS+ 1+ INT ((RF- RS)/ 2):GET 3,I;A$[1],B$[1],C$[23]:I$= RIGHT$ (STR$ (I),LEN (STR$ (I))- 1):PRINT ""I$""TAB( 5)LEFT$ (C$,19)""TAB( 24)ASC (A$)""TAB( 27)ASC (B$)"":NEXT I
18 Y= 2:FOR I= ITO RF+ 1:GET 3,I;A$[1],B$[1],C$[23]:PLOT 3,32,Y:I$= RIGHT$ (STR$ (I),LEN (STR$ (I))- 1):PRINT ""I$"":PLOT 3,37,Y:PRINT LEFT$ (C$,19):PLOT 3,56,Y:PRINT ""ASC (A$)
19 PLOT 3,59,Y:PRINT ""ASC (B$)"":Y= Y+ 1:NEXT I:PLOT 3,0,31:INPUT "PRESS RETURN TO CONTINUE:";AZ:PLOT 12:GOTO 8
20 PRINT :INPUT "ENTER NAME OF ARTICLE (I.E.DSPCPY):";Y$
21 PRINT
22 ZZ= 6- LEN (Y$):IF ZZ= 0THEN 25
23 FOR AB= 1TO ZZ:Y$= Y$+ " ":NEXT AB:GOTO 25
24 PRINT :INPUT "ENTER SEARCH STRING (I.E. DS ):";Y$:KK= LEN (Y$)
25 PRINT :RH= LR+ 1:RL= 2
26 TG= INT (RH/ 2):GOTO 29
27 IF TG< RHTHEN RH= TG:TG= INT (TG- (TG- RL)/ 2):GOTO 29
28 IF TG> RLTHEN RL= TG:TG= INT (TG+ (RH- TG)/ 2)
29 GET 3,TG;A$[1],B$[1],J$[KK]
30 TI= TI+ 1:IF TI= 15THEN TI= 0:PRINT "CAN'T FIND ARTICLE!":PRINT :GOTO 8
31 IF Y$> LEFT$ (J$,KK)THEN 28
32 IF Y$< LEFT$ (J$,KK)THEN 27
33 FOR R= TGTO 2STEP - 1:GET 3,R,3;J$[23]
34 IF Y$< > LEFT$ (J$,LEN (Y$))THEN 36
35 NEXT R
36 FOR U= R+ 1TO LR
37 GET 3,U;A$[1],B$[1],C$[23]
38 IF LEFT$ (C$,LEN (Y$))< > Y$THEN 41
39 PRINT "ARTICLE "C$" IS IN ISSUE"TAB( 44)ASC (A$)""TAB( 47)ASC (B$)" RECORD"U- 1
40 NEXT U
41 TI= 0:PRINT :GOTO 8
42 PRINT "FILE NOT OPENED!":FOR G= 1TO 1000:NEXT G:GOTO 1003