1 REM :::: FILENAME = SEARCH :::::::::::::::::::::::::::::::: 2 REM :: THIS PROGRAM WILL FIND ALL THE MATCHES TO YOUR INPUT STRING :: 3 REM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 10 REM NUMBER OF CHARS IN FRONT OF FOUND VERSE....... 11 F=128 12 REM NUMBER OF CHARS IN BACK OF FOUND VERSE...... 13 B=128 14 REM F=0 B=0 \ REM CAUSES A$(N) TO PRINT NOEDITING...MAKESITFASTER 15 DIM R%(66,150) 18 REM NORMAL .................. S$ = SEARCH STRING 19 S0=1 20 DIM #3,R(66,150) 30 OPEN "BIBLE.I" AS FILE #3 40 FOR I%=1% TO 66% 41 R%(I%,0%)=R(I%,0%) 42 FOR J%=1 TO R%(I%,0) 45 R%(I%,J%)=INT(R(I%,J%)/255) 46 NEXT J% 47 NEXT I% 50 CLOSE #3 70 DIM B$(66) 80 FOR I%=1% TO 66% 81 READ B$(I%) 82 NEXT I% 90 DATA GENISIS,EXODUS,LEVITICUS,NUMBERS,DEUTERONOMY,JOSHUA,JUDGES,RUTH 100 DATA 1SAMUEL,2SAMUEL,1KINGS,2KINGS,1CHRONICLES,2CHRONICLES,EZRA 110 DATA NEHEMIAH,ESTHER,JOB,PSALMS,PROVERBS,ECCLESIATES,SONG OF SOLOMON 120 DATA ISAIAH,JEREMIAH,LAMENTATIONS,EZEKIEL,DANIEL,HOSEA,JOEL,AMOS 130 DATA OBADIAH,JONAH,MICAH,NAHUM,HABAKKUK,ZEPHANIAH,HAGGAI,ZECHARIAH,MALACHI 140 DATA MATTHEW,MARK,LUKE,JOHN,ACTS,ROMANS,1CORINTHIANS,2CORINTHIANS 150 DATA GALATIANS,EPHESIANS,PHILIPPIANS,COLOSSIANS,1THESSALONIANS 160 DATA 2THESSALONIANS,1TIMOTHY,2TIMOTHY,TITUS,PHILEMON,HEBREWS,JAMES 161 DATA 1PETER,2PETER,1JOHN,2JOHN,3JOHN,JUDE,REVELATION 165 DIM #4,A1$(4.42880E+06)=1 166 OPEN "BIBLE.BIB" AS FILE #4 170 DIM #1,A$(17366)=255 171 OPEN "BIBLE.BIB" AS FILE #1 172 REM ...... CYCLE SEARCH ........ ........... 173 READ F$ 174 IF F$="#" THEN GO TO 950 175 IF F$="END" THEN 10008 176 P=POS(F$,".",1) 177 IF P=0 THEN F$=F$+".FIN" 178 B$=CLK$ 179 READ S$ 180 OPEN F$ FOR OUTPUT AS FILE #2 DOUBLE BUF 190 PRINT S$ 191 U$="" 192 U1$=S$ 193 FOR I=1 TO LEN(S$) 194 U$=CHR$(95)+U$+CHR$(8) 195 U1$=U1$+CHR$(8) 196 NEXT I 204 U$=U1$+U$ 207 PRINT #2,"EVERY OCCURRENCE OF ";CHR$(34);S$;CHR$(34);" IN THE BIBLE " 208 PRINT #2 209 REM -------- START OF LOOP FOR SEARCH -------- 210 FOR N=0 TO 17367 212 IF S0=1 THEN 250 214 A$=A$(N) 216 P%=0% 217 P1%=0% 218 S5%=0% 219 S9%=0% 220 FOR S=1 TO S0 221 P1%=POS(A$,S$(S),1%) 222 IF P1%=0 THEN 230 224 IF P%=0% THEN P%=P1% 225 IF P1%>S9% THEN S9%=P1% 230 NEXT S 235 S5%=S9%-P% 240 IF P%=0 THEN 900 249 GO TO 260 250 P%=POS(A$(N),S$,1%) 251 IF P%=0 THEN 900 252 REM SINGLE STRING SEARCH ........ 260 FOR I%=1 TO 66 270 IF R%(I%,1)