Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap4_198111 - decus/20-0102/infsar.bas
There are 2 other files named infsar.bas in the archive. Click here to see a list.
00010 REM INFSAR SAPSFORD/NADDOR 75
00011 I$="BAS:INFSTA.BAS"
00012 S$="22-MAR-76"
00014 PRINT S$" VERSION"
00016 PRINT
00100 Q0=0
00105 Q1=1
00110 Q2=2
00115 RANDOMIZE
00120 A9=100
00125 DIM V$(100)
00130 DIM S$(10),S1$(10),S2$(10),G1$(10),G2$(10)
00133 DIM L(19)
00135 DIM Z$(2),C(9,6),T(9),S(100)
00140 REM LINES 140-199 ARE RESERVED FOR RAN
00145 REM USE THESE LINES AT YOUR OWN PERIL
00200 DEF FNR(X,Y)=X+INT(RND*(Y-X+1))
00210 DEF FNS(X)=INT(10*X+0.1)-9*INT(X)
00300 '   1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16 17 18 19
00305 J$="STOSTABRIDESCLETRAADDCANCHADISFINLOCRANREPLINFILUPDTOTINS"
00422 O$="FD TYPE LENGTH TITLE"
00423 P$="## 'CC    ##.# 'E"
00950 T2=4
00955 T1=-FNU(T2,2,2)
00960 PRINT"/";
00965 T1=-FNU(T2,2,2)+T2
00970 GOTO 1040
00980 PRINT"NO FILE SYSTEM - START OR BRING"
00990 PRINT"BAD COMMAND"
01000 PRINT
01005 T1=FNU(TIM-T1,2,2)
01007 PRINT"/";
01010 T1=FNU(TIM+T2,2,2)-T2
01040 MAT INPUT S$
01050 PRINT
01055 IF LEN(S$(1))<3 THEN 990
01060 L=INSTR(Q1,J$,LEFT$(S$(1),3))
01070 IF L=Q0 THEN 990
01080 F1=F2=F3=F4=F5=F6=F7=F8=F9=0
01110 L=Q1+(L-Q1)/3
01130 IF C9<>0 THEN 1170
01140 IF L>3 THEN 980
01170 ON INT((L+4)/5) GOTO 1180,1190,1200,1210
01180 ON L GOTO 99999,1302,2000,1304,1305
01190 ON L-5 GOTO 5000,20000,30000,7000,8000
01200 ON L-10 GOTO 30000,30000,10000,8000,30000
01210 ON L-15 GOTO 3000,9000,30000,16000
01302 GOTO 1350
01304 GOTO 1350
01305 GOTO 1350
01350 CHAIN I$
02000 IF INSTR(S$(2),".")<>0 THEN 990
02010 FILE :1,S$(2)+".ANC$", :2,S$(2)+".STO$"
02020 Z9$=S$(2)
02030 IF F5=1 THEN 2150	
02050 SET :1,1
02060 READ :1,S$,O6$,C$,U0$,L$
02070 F$=LEFT$(S$,18)
02072 A$=MID$(S$,19,6)
02074 D$=MID$(S$,25,9)
02076 O7$=MID$(S$,34,10)
02078 O5$=MID$(S$,44,2)
02079 D1$=MID$(S$,46,26)
02080 GOSUB 42000
02090 FOR I=1 TO C9
02095 READ :1, S1$(I),S2$(I)
02100 NEXT I
02150 PRINT S$(2)+" READY"
02160 GOTO 1000
03000 IF INSTR(1,S$(1),"/R")<>0 THEN 3110	
03010 PRINT O$
03030 FOR I=1 TO C9
03040 K=C(I,4)
03050 ON C(I,3) GOTO 3080,3080,3080,3060,3060,3080
03060 K=K-INT(10*(K-INT(K))+0.5)
03080 PRINT USING P$,I,MID$(F$,C(I,3)*3-2,3),K,U$(I)
03090 NEXT I
03100 PRINT
03110 PRINT LOF(:2);" RECORDS IN ";Z9$+".STO"
03120 GOTO 1000
05000 Z9$=S$(2)				'TRANSFER		5000
05001 I=INSTR(Z9$,".")
05002 IF I=0 THEN 5090
05004 PRINT".EXT NOT NEEDED"
05006 Z9$=LEFT$(Z$,I-1)
05090 FILE :3,Z9$+".STO$"+G9$
05092 SET :3,1
05095 F5=1
05096 GOTO 30000
05100 SET :1,1
05105 FILE :3,Z9$+".ANC$132"
05110 SET :3,1
05120 FOR I=1 TO 5+2*C9
05130 READ :1,S$
05140 WRITE :3,S$
05150 NEXT I
05160 PRINT
05170 S$(2)=Z9$
05190 FILE :3,"TMP."+G9$+"$"+G9$
05200 GOTO 2010
07000 PRINT"FD:NEW";			'CHANGE			7000
07005 INPUT S$
07010 IF S$="STOP" THEN 7026
07020 GOSUB 82000
07021 IF K2=-1 THEN 7000
07022 U$(K2)=S$
07024 GOTO 7000
07026 U0$=""
07030 FOR I=1 TO C9
07040 U$=U$(I)
07050 U=LEN(U$)
07060 C=INT(C(I,4)+0.95)
07070 ON SGN(U-C)+2 GOTO 7080,7140,7130
07080 IF ABS(4.5-C(I,3))<1 THEN 7110
07090 U$=U$+SPACE$(C-U)
07100 GOTO 7145
07110 U$=SPACE$(C-U)+U$
07120 GOTO 7140
07130 U$=LEFT$(U$,C)
07140 IF C(I,3)<>5 THEN 7145
07142 U$=" "+U$
07145 U0$=U0$+U$+" "
07150 NEXT I
07400 SET :1,4
07410 WRITE :1, U0$
07420 PRINT"CHANGED"
07430 GOTO 1000
08000 K1=1				'DISPLAY		8000
08020 D=K2=LOF(:2)
08030 IF D=0 THEN 8190
08040 IF NUM>2 THEN 8080
08050 S$(3)=S$(2)
08080 T$=S$(2)+S$(3)
08081 GOSUB 81000
08082 IF F4=-1 THEN 990
08088 K1=VAL(S$(2))
08090 K2=VAL(S$(3))
08100 FOR U=K1 TO K2
08110 IF U>D THEN 8190
08120 SET :2,U
08130 READ :2, S$
08135 PRINT U;TAB(5);
08140 GOSUB 60000
08150 IF RIGHT$(S$,1)<>CHR$(2) THEN 8170
08160 PRINT " *";
08170 PRINT
08180 NEXT U
08190 GOTO 1000
09000 U1=0				'UPDATE			9000
09010 MAT T=ZER
09020 F1=SGN(INSTR(4,S$(1),"/Q"))
09030 IF F1=1 THEN 9080
09040 PRINT"RECORDS REMOVED:"
09050 PRINT U0$
09060 PRINT
09080 FILE :3, "TMP"+G9$+".TMP$"+G9$
09090 SET :3,1
09100 U=LOF(:2)
09110 IF U=0 THEN 9350
09120 SET :2,1
09130 FOR I1=1 TO U
09140 READ :2, S$
09150 IF RIGHT$(S$,1)=CHR$(2) THEN 9180
09160 WRITE :3, S$
09170 GOTO 9220
09180 U1=U1+1
09190 IF F1=1 THEN 9080
09200 GOSUB 60000
09210 PRINT
09220 NEXT I1
09230 I=0
09240 SCRATCH :2
09250 FILE :2, Z9$+".STO$"+G9$
09260 SET :2,1
09270 IF LOF(:3)=0 THEN 9350
09280 RESTORE :3
09290 FOR I=1 TO LOF(:3)
09300 READ :3, S$
09310 WRITE :2, S$
09320 NEXT I
09330 GOSUB 34000
09340 PRINT
09350 PRINT "UPDATED "Z9$".STO : ";U1;" CANCELLATIONS"
09360 SCRATCH :3
09380 GOTO 1000
10000 PRINT"WEAVE INFRAN.BAS***"
10010 STOP
16000 IF NUM<4 THEN 990			
16010 G8=NUM-1
16020 FOR I=1 TO G8
16025 V$(I)=S$(I+1)
16030 NEXT I
16040 FOR J0=1 TO 2
16045 S$=V$(J0)
16050 GOSUB 82500
16055 IF K2=-1 THEN 990
16060 I=G(J0)=K2
16065 GOSUB 23000
16070 IF F9=-1 THEN 1000
16080 G1$(J0)=S$
16090 NEXT J0
16100 IF G(1)>1 THEN 990
16105 S1$=G1$(1)
16110 GOSUB 80000
16115 I9=K1
16120 SET :2,I9
16130 READ :2,V$
16133 IF RIGHT$(V$,1)=CHR$(2) THEN 16145
16135 T$=LEFT$(V$,C(1,2))
16136 IF T$>G1$(1) THEN 16190
16138 IF T$<G1$(1) THEN 16145
16140 IF MID$(V$,C(G(2),1),C(G(2),2))=G1$(2) THEN 16200
16145 IF I9=LOF(:2) THEN 16190
16150 I9=I9+1
16160 GOTO 16130
16190 PRINT"NOT FOUND"
16195 GOTO 1000
16200 V$=" "+V$
16205 FOR J0=3 TO G8
16210 S$=V$(J0)
16220 GOSUB 82500
16230 IF K2=-1 THEN 990
16240 I=K2
16250 GOSUB 23000
16260 IF F9=-1 THEN 1000
16270 V$=LEFT$(V$,C(K2,1))+S$+MID$(V$,C(K2+1,1)+1)
16280 NEXT J0
16290 SET :2,I9	'CHANGE I9 TO SOMETHING ELSE SAFE
16300 WRITE :2,MID$(V$,2)
16310 PRINT"INSERTED"
16320 GOTO 1000
20000 F8=1				'ADD			20000
20005 K9=0
20010 IF LEFT$(S$(2),3)="PRO" THEN 22000
20020 F8=0
20030 PRINT "  "U0$
21000 MAT INPUT S$
21010 IF NUM>1 THEN 21050
21020 IF S$(1)="STOP" THEN 22500
21050 IF NUM=C9 THEN 22000
21060 PRINT"BAD ENTRY"
21070 GOTO 21000
22000 V$=""
22010 F3=0
22019 FOR I=1 TO C9
22020 S$=S$(I)
22021 IF F8=0 THEN 22030
22022 PRINT LEFT$(U$(I),6);TAB(8);
22023 INPUT S$
22024 IF I>1 THEN 22026
22025 IF S$="STOP" THEN 22500
22026 S$(I)=S$
22030 GOSUB 23000
22040 IF F9=-1 THEN 22500
22050 V$=V$+S$
22060 NEXT I
22061 IF F8=0 THEN 22065
22062 PRINT
22065 K9=K9+1
22070 V$(K9)=V$+CHR$(1)
22080 IF K9=A9 THEN 22500
22100 ON F8+1 GOTO 21000,22000
22500 IF K9=0 THEN 22540
22510 GOSUB 51000
22540 GOTO 1000
23000 ON C(I,3) GOTO 29000,24000,25000,26000,26000,28070
24000 Z$="DATE"
24010 IF LEN(S$)<>8 THEN 29500
24020 S$=LEFT$(S$,2)+MID$(S$,4,2)+RIGHT$(S$,2)
24025 T$=MID$(S$,3,2)
24030 GOSUB 81000
24040 IF ABS(F4-6)>6.5 THEN 29500
24060 IF MID$(S$,5)<=MID$(D1$,2*F4+1,2) THEN 27000
24070 GOTO 29500
25000 Z$="SSN"
25005 S$="0"+LEFT$(S$,3)+MID$(S$,5,2)+MID$(S$,8)
25010 IF LEN(S$)<>10 THEN 29500
25020 IF INSTR(1,S$,"-")=0 THEN 27000
25040 GOTO 29500
26000 C4=C(I,4)
26005 K=INT(10*(C4-INT(C4))+0.5)
26006 Z$="OVERFLOW"
26010 K1=INT(C4)-K
26020 K3=INSTR(1,S$,".")-1
26030 IF K3>-1 THEN 26050
26040 K3=LEN(S$)
26050 T$=LEFT$(S$,K3)
26060 K4=LEN(S$)-K3-1
26070 IF K4>-1 THEN 26100
26080 K4=0
26090 GOTO 26110
26100 T$=T$+RIGHT$(S$,K4)
26110 ON SGN(K1-K3)+2 GOTO 29500,26160,26150
26150 T$=LEFT$(O7$,K1-K3)+T$
26160 ON SGN(K-K4)+2 GOTO 26170,26200,26190
26170 T$=LEFT$(T$,LEN(T$)+K-K4)
26180 GOTO 26200
26190 T$=T$+LEFT$(O7$,K-K4)
26200 IF INT(C4)/2=INT(INT(C4)/2) THEN 27020
26210 T$="0"+T$
26220 GOTO 27020
27000 T$=S$
27020 S$=""
27025 Z$="NUMBER"
27030 F3=0
27040 GOSUB 81000
27045 IF F4=-1 THEN 29500
28000 FOR V=1 TO S(0) STEP 2
28005 I2=S(V)*10+S(V+1)-513	'=-48*10-48+15
28010 IF I2<32 THEN 28030
28020 I2=I2+1
28030 S$=S$+CHR$(I2)
28050 NEXT V
28060 RETURN
28070 K=LEN(S$)
28080 ON SGN(K-C(I,2))+2 GOTO 28090,28150,28110
28090 GOTO 29200	'IT WILL EXIT FROM 29200
28110 S$=LEFT$(S$,C(I,2))
28150 RETURN
29000 ' CORRECT NAME LENGTHS
29010 K=LEN(S$)
29020 IF K>=C(I,2) THEN 29070
29030 GOTO 29200	'IT WILL EXIT FROM 29200
29070 FOR J=K TO 3 STEP -1
29080 IF K=C(I,2) THEN 29150
29090 P=INSTR(Q1,A$,MID$(S$,J,1))
29100 IF P=0 THEN 29130
29110 S$=LEFT$(S$,J-1)+MID$(S$,J+1)
29120 K=K-1
29130 NEXT J
29140 S$=LEFT$(S$,C(I,2))
29150 RETURN
29200 CHANGE S$ TO S
29210 FOR I1=K+1 TO C(I,2)
29220 S(I1)=1
29230 NEXT I1
29240 S(0)=C(I,2)
29250 CHANGE S TO S$
29260 RETURN
29500 IF S$(I)="STOP" THEN 29550
29505 PRINT " ERROR IN "Z$": "S$(I)
29510 PRINT LEFT$(U$(I),6);TAB(8);
29520 INPUT S$
29530 IF S$="STOP" THEN 29550
29535 S$(I)=S$
29540 GOTO 23000
29550 F9=-1
29560 RETURN
30000 G8=NUM-1-F5			'FIN,LOC,TOT,CAN,LIN	30000
30005 IF G8<1 THEN 990
30100 FOR G=1 TO G8
30105 S1$=S2$=""
30110 S$=S$(G+1+F5)
30120 GOSUB 82500
30130 IF K2=-1 THEN 990
30140 G(G)=K2
30150 GOSUB 31000
30152 G1$(G)=S1$
30154 G2$(G)=S2$
30155 NEXT G
30160 FOR G=1 TO G8
30165 I=G(G)
30170 FOR J0=1 TO 2
30172 G$=G1$(G)
30174 S$=S1$(I)
30176 IF J0=1 THEN 30185
30178 G$=G2$(G)
30180 S$=S2$(I)
30185 IF LEN(G$)>=LEN(S$) THEN 30195
30190 S$=S$(I)=G$+MID$(S$,LEN(G$)+1)
30192 GOTO 30196
30195 S$=S$(I)=G$
30196 GOSUB 23000
30200 IF F9=-1 THEN 1000
30202 IF J0=2 THEN 30205
30203 G1$(G)=S$
30204 GOTO 30210
30205 G2$(G)=S$
30210 NEXT J0
30215 NEXT G
30275 MAT T=ZER
30276 K1=1
30277 IF G(1)>1 THEN 30290
30278 S1$=G1$(1)
30280 GOSUB 80000
30285 ' BEGIN THE MAIN LOOP
30290 K9=0
30295 F6=0
30300 F2=1
30305 F7=0
30310 SET :2,K1
30315 READ :2, S$
30317 IF RIGHT$(S$,1)=CHR$(2) THEN 30515
30325 FOR G=1 TO G8
30330 T$=MID$(S$,C(G(G),1),C(G(G),2))
30335 IF T$<G1$(G) THEN 30515
30340 IF T$>G2$(G) THEN 30513
30345 NEXT G
30350 IF L<>L(15) THEN 30370
30355 GOSUB 60000
30360 GOTO 30510
30370 IF L<>L(6) THEN 30400
30380 WRITE :3, S$
30390 GOTO 30510
30400 IF F6=0 THEN 30406
30402 IF L<>L(12) THEN 30434
30403 GOTO 30425
30406 IF L<>L(12) THEN 30430
30407 PRINT"RECORD",LEFT$(U0$,INT(C(I,4)+0.95))
30415 PRINT
30425 GOSUB 59000
30427 GOTO 30510
30430 PRINT U0$
30432 PRINT
30434 GOSUB 60000
30435 IF L<>L(8) THEN 30500
30440 IF Z$<>"ALL" THEN 30455
30445 PRINT
30450 GOTO 30480
30455 PRINT " CANCEL";
30460 INPUT Z$
30465 Z$=LEFT$(Z$,4)
30470 I=INT((INSTR(1,"STOPALL YES NO  ",Z$)+7)/4)
30475 ON I GOTO 30460,30580,30480,30480,30510
30480 S$=LEFT$(S$,LEN(S$)-1)+CHR$(2)
30485 SET :2,K1
30490 WRITE :2, S$
30500 PRINT
30510 F6=F6+1
30511 GOTO 30515
30513 IF G(G)=1 THEN 30525
30515 K1=K1+1
30520 IF K1<=LOF(:2) THEN 30310
30525 IF L=L(15) THEN 30555
30530 IF L<>L(18) THEN 30580
30535 IF F7<2 THEN 30580
30545 GOSUB 34000
30550 GOTO 30580
30555 PRINT F6"RECORDS FOUND"
30560 PRINT
30565 GOSUB 35000
30580 IF F6=0 THEN 30595
30591 IF F5=1 THEN 5100
30592 GOTO 30600
30595 PRINT "NOT FOUND"
30600 GOTO 1000
31000 IF C(K2,3)<>3 THEN 32000
31010 IF LEN(S$)<>11 THEN 31040
31020 IF MID$(S$,6,1)="-" THEN 31040
31030 S$=S$+"-"+S$
31040 J=LEN(S$)/2
31090 S1$=LEFT$(S$,J-0.5)
31100 S2$=MID$(S$,J+1.5)
31110 GOTO 32220
32000 'ALL ELSE
32010 J=INSTR(1,S$,"-")
32020 IF J<>0 THEN 32050
32030 S1$=S2$=S$
32040 GOTO 32090
32050 IF J=1 THEN 32080
32060 S1$=LEFT$(S$,J-1)
32070 IF J=LEN(S$) THEN 32090
32080 S2$=MID$(S$,J+1)
32090 IF ABS(4.5-C(K2,3))>1 THEN 32220
32100 'PAD NUMBERS ON LEFT WITH ZEROES
32110 J=INT(C(K2,4))*11-INT(C(K2,4)*10+0.5)
32120 F3=0
32130 T$=S1$
32140 GOSUB 33000
32150 IF F3=1 THEN 32220
32170 S1$=T$
32180 T$=S2$
32190 GOSUB 33000
32200 IF F3=1 THEN 32220
32210 S2$=T$
32220 RETURN
33000 K1=INSTR(1,T$,".")-1
33010 IF K1>-1 THEN 33030
33020 K1=LEN(T$)
33030 ON SGN(J-K1)+2 GOTO 33060,33080,33040
33040 T$=LEFT$(O7$,J-K1)+T$
33050 GOTO 33080
33060 PRINT"NUMBER TOO LARGE"
33070 F3=1
33080 RETURN
34000 FOR I=1 TO C9			'PRINT TOTAL LINE	34000
34020 IF C(I,3)<>5 THEN 34070
34030 K3=INT(10*(C(I,4)-INT(C(I,4)))+0.5)
34040 T(I)=FNU(T(I),INT(C(I,4))-K3+C(I,3)-4,K3)
34050 PRINT " ";
34060 GOTO 34080
34070 PRINT SPACE$(INT(C(I,4)+1.95));
34080 NEXT I
34090 PRINT
34100 RETURN
35000 K3=-INT(C(0,4)+0.95)		'LIN TOTAL LINE		35000
35020 FOR I=1 TO C9
35030 K3=K3+INT(C(I-1,4)+1.95)
35040 IF C(I,3)<>5 THEN 35060
35050 PRINT MID$(" "+U0$,K3,INT(C(I,4)+C(I,3)-2.05));
35060 NEXT I
35070 PRINT
35080 FOR I=1 TO C9
35090 IF C(I,3)<>5 THEN 35130
35100 K3=INT(10*(C(I,4)-INT(C(I,4)))+0.5)
35110 T(I)=FNU(T(I),INT(C(I,4))-K3+C(I,3)-4,K3)
35120 PRINT " ";
35130 NEXT I
35140 PRINT
35150 RETURN
42000 CHANGE C$ TO S			'INDATA FROM ANCHOR	42000
42010 'C9=S(0)/5 - C(1,1-5),...,C(C9,1-5)
42020 S$=""
42050 C9=S(0)/5
42060 FOR I=1 TO C9
42062 K=5*I
42064 C(I,1)=S(K-4)-15
42066 C(I,2)=S(K-3)-15
42068 C(I,3)=S(K-2)-15
42070 C(I,4)=(S(K-1)-15)/10
42072 C(I,5)=S(K)-15
42080 CHANGE MID$(U0$,C(I,5),INT(C(I,4)+1.95)) TO L
42082 J=0
42083 L=L(0)
42084 FOR J1=1 TO L
42086 IF L(J1)=32 THEN 42092
42088 J=J+1
42090 L(J)=L(J1)
42092 NEXT J1
42094 L(0)=J
42104 CHANGE L TO U$(I)
42120 NEXT I
42130 G9=C(C9,1)+C(C9,2)
42132 C(C9+1,1)=G9
42135 G9$=STR$(G9)
42140 CHANGE L$ TO L
42145 FOR I=1 TO L(0)
42150 L(I)=L(I)-15
42155 NEXT I
42999 RETURN
51000 H=121
51060 FOR J=H+1 TO K9
51070 I=J-H
51080 V$=V$(J)
51090 IF V$>=V$(I) THEN 51130
51100 V$(I+H)=V$(I)
51110 I=I-H
51120 IF I>0 THEN 51090
51130 V$(I+H)=V$
51140 NEXT J
51145 H=INT(H/3)
51150 IF H>=1 THEN 51060
51160 PRINT
51170 PRINT"SORTED"
52000 K2=LOF(:2)			'MERGE V$() ON :2	52000
52020 SET :2,K2+1
52030 FOR I=1 TO K9
52040 WRITE :2, V$(I)
52050 NEXT I
52060 IF K2=0 THEN 52270
52070 K3=K2+K9
52080 SET :2,K2
52090 READ :2,V$
52100 SET :2,K3
52110 K3=K3-1
52120 IF V$>V$(K9) THEN 52170
52130 WRITE :2,V$(K9)
52140 K9=K9-1
52150 IF K9>0 THEN 52100
52160 GOTO 52270
52170 WRITE :2,V$
52180 K2=K2-1
52190 IF K2>0 THEN 52080
52200 SET :2,K3
52210 WRITE :2,V$(K9)
52220 K9=K9-1
52230 IF K9=0 THEN 52270
52240 K3=K3-1
52250 GOTO 52200
52270 PRINT"MERGED"
52280 RETURN
59000 PRINT"R="K1,			'LOCATE PRINTER		59000
59020 I=1
59030 S$(1)=LEFT$(S$,C(I,2))
59040 GOSUB 60110
59050 PRINT S$(1)
59060 RETURN
60000 FOR I=1 TO C9			'PRINT RECORD == S$	60000
60020 S$(I)=MID$(S$,C(I,1),C(I,2))
60025 GOSUB 60110
60040 IF L=L(15) THEN 60080
60070 PRINT S$(I);" ";
60080 NEXT I
60090 F7=F7+1
60100 RETURN
60110 ON C(I,3) GOTO 61000,62000,63000,64000,64000,61000
61000 CHANGE S$(I) TO S
61010 FOR I2=1 TO S(0)
61020 IF S(I2)<>1 THEN 61040
61030 S(I2)=32
61040 NEXT I2
61050 CHANGE S TO S$(I)
61070 RETURN
62000 GOSUB 65000
62010 S$(I)=LEFT$(S$(I),2)+"/"+MID$(S$(I),3,2)+"/"+MID$(S$(I),5)
62020 RETURN
63000 GOSUB 65000
63010 S$(I)=MID$(S$(I),2,3)+"-"+MID$(S$(I),5,2)+"-"+MID$(S$(I),7)
63020 RETURN
64000 GOSUB 65000
64010 K=INT(10*(C(I,4)-INT(C(I,4)))+0.5)
64020 T$=STR$(VAL(LEFT$(S$(I),2*C(I,2)-K)))
64030 IF K=0 THEN 64050
64040 T$=T$+"."+RIGHT$(S$(I),K)
64050 S$(I)=SPACE$(INT(C(I,4)+1.95)-LEN(T$))+T$
64060 IF C(I,3)<>5 THEN 64110
64070 IF L=L(11) THEN 64090
64080 T(I)=T(I)+VAL(S$(I))
64090 S$(I)=" "+MID$(S$(I),2)
64100 GOTO 64120
64110 S$(I)=MID$(S$(I),2)
64120 RETURN
65000 FOR J=1 TO C(I,2)
65010 T=INSTR(1,O6$,LEFT$(S$(I),1))-1
65020 IF T<18 THEN 65040
65030 T=T-1
65040 S$(I)=MID$(S$(I),2)+CHR$(48+INT(T/10))+CHR$(48+T-INT(T/10)*10)
65050 NEXT J
65060 RETURN
70000 REM	VARIABLES USED: M1, M2, M$
70010 DEF FNU (N,B,A)
70020 FNU=N
70030 M1=ABS(N)+(.5*10^-A) 
70040 M2=INT(.75-.5*SGN(N))
70050 M$=STR$(INT(M1))
70060 IF INSTR(M$,"E")<>0 THEN 70150
70070 IF LEN(M$)+M2>B THEN 70150
70080 IF A>9 THEN 70150
70090 IF B>9 THEN 70150
70100 M$="          "+MID$(" -",M2+1,1)+M$
70110 PRINT RIGHT$(M$,B);
70120 IF A<1 THEN 70160
70130 PRINT ".";RIGHT$("000000000"+STR$(INT((M1-INT(M1))*10^A)),A);
70140 GO TO 70160
70150 PRINT"&";STR$(N);
70160 FN END
80000 K=K1=1		'BINARY SEARCH		80000
80010 K2=LOF(:2)
80020 C2=C(1,2)
80030 IF K2<K1 THEN 80120
80040 K=INT((K1+K2)/2)
80050 SET :2,K
80060 READ :2, S$
80070 IF LEFT$(S$,C2)<S1$ THEN 80100
80080 K2=K-1
80090 GOTO 80030
80100 K1=K+1
80110 GOTO 80030
80120 K1=K
80130 RETURN
81000 'CODE TO VERIFY VAL(T$),F4=-1 FOR ERROR
81005 F4=0
81010 CHANGE T$ TO S
81020 FOR V=1 TO S(0)
81030 V0=S(V)-48
81040 IF V0<0 THEN 81080
81050 IF V0>9 THEN 81080
81060 F4=F4*10+V0
81070 NEXT V
81075 GOTO 81090
81080 F4=-1
81090 RETURN
82000 'DECODE FIND,CHANGE INPUT
82500 N=INSTR(2,S$,":")
82510 IF N=0 THEN 82620
82540 T$=LEFT$(S$,N-1)
82550 GOSUB 81000
82560 ON SGN(F4)+2 GOTO 82590,82620,82570
82570 K2=F4
82580 GOTO 82640
82590 FOR K2=1 TO C9
82600 IF INSTR(U$(K2),T$)=1 THEN 82640
82610 NEXT K2
82620 PRINT"ILLEGAL FIELD LABEL"
82625 K2=-1
82630 GOTO 82999
82640 S$=MID$(S$,N+1)
82999 RETURN
99999 END
*U*.