Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape17a_acorn_eu_1990_december.wav » WW+DB
WW+DB
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape17a_acorn_eu_1990_december.wav |
Filename: | WW+DB |
Read OK: | ✔ |
File size: | 227B bytes |
Load address: | FFFFFFFF |
Exec address: | FFFFFFFF |
Duplicates
There are 3 duplicate copies of this file in the archive:
- AEW website » mu » mu_5_25_discs_Micro_User_08_10_D-MU08_10.ssd » WW+DB
- AEW website » mu » mu_Micro_User_08_10_MU8-10_B.uef » WW+DB
- Personal collection » Acorn tapes » Electron_User » Electron_User_tape17a_acorn_eu_1990_december.wav » WW+DB
- Personal collection » Acorn tapes » Electron_User » Electron_User_tape17b_acorn_eu_1990_december.wav » WW+DB
File contents
REM.. D.ANALYZE REM.. BY C J Waldock REM.. (C) The Micro User REM.. use COSORTD first REM.. and leave sorted file in TEXT REM.. reset total T%=0 REM.. define constant, carriage return R$=c.13 select text repeat procPICKUP procCOUNT until false display END .PICKUP select text cursor top REM.. find first unreversed marker find">" S$=glt$ REM.. look for end marker if S$=">END" t.g.END REM.. set up search string S$=S$+R$+gct$+gct$ REM.. go back to reverse record marker cursor at 0 cursor up repl.">","<" REM.. start count C% C%=1 endproc .COUNT repeat REM.. look for string find S$ REM.. reverse marker replace">","<" REM.. increment counter for this class C%=C%+1 until EOT REM.. adjust counter C%=C%-1 REM.. add class count to total count T%=T%+C% REM.. add class total to record procRECORD endproc .RECORD select segment 1 type S$+": "+str$C% type " member(s)"+R$+R$ display endproc .END select segment 1 type"TOTAL OF MEMBERS: "+STR$T%+R$+R$ REM.. correct reversed record markers select text cursor top repeat replace"<",">" until EOT select segment 1 display END ======================= REM.. D.BISORTD REM.. BY C J Waldock REM.. (C) The Micro User REM.. Reads records from disc, uses REM.. binary search for record place REM.. reset record counter C% C%=0 REM.. set constants REM.. R$=carriage return R$=chr$13 REM.. Z$=endmarker in file Z$=">END" procOPENFILE REM.. reset timer TIME=0 procHEAD procTAIL repeat procREAD procLOCATE until false .OPENFILE cls vdu10,10,10 print "ENTER FILE NAME TO BE SORTED" print "==>"; F$=glk$ F%=openinF$ print print "WORKING . ." print print "This may take a few minutes" endproc REM.. reserve heading in segment 0 .HEAD select segment 0 delete text REM.. read and save top four lines dothis type glf$F%+R$ times 4 endproc REM.. Set up start and end markers REM.. for sorting .TAIL select text delete text REM.. ASCII code "!" precedes all REM.. and ASCII code "~" follows all REM.. alphabetic characters REM.. Build markers into dummy records Y$="!" procDUMMIES Y$="~" procDUMMIES endproc REM.. insert dummy records .DUMMIES dothis type ">" dothis type Y$+R$ times 9 times 3 endproc REM.. read first four lines of record .READ A$=glf$F% REM.. check for file end if A$=Z$ then goto END B$=glf$F% C$=glf$F% D$=glf$F% REM.. S$=surname+forename S$=C$+D$ REM.. increment record count C% C%=C%+1 REM.. set scope of search D% D%=C% endproc .LOCATE REM.. move to third dummy cursor top cursor down 20 .SEEK REM at each search scope D% is halved if D%>1 then D%=D%/2 REM.. compare S$ with name in record if S$<glt$+glt$ then goto UP REM.. jump to next record cursor down 7 REM.. compare S$ with name in record ifS$>glt$+glt$ then goto DOWN cursor up 4 procINSERT display endproc REM.. S$ was "less than" name found REM.. so move back in records REM.. to look again .UP cursor up(D%*9)+2 goto SEEK REM.. S$ was "greater than" name found REM.. so move forward in records REM.. to look again .DOWN cursor up 2 cursor down(D%*9) goto SEEK REM.. add record to correct place .INSERT REM.. enter lines already read type A$+R$ type B$+R$ type C$+R$ type D$+R$ REM.. read rest of record from disc REM.. and enter lines as read dothis type glf$F%+R$ times 5 endproc .END close#0 procTIDY procTIME display END .TIDY REM.. set markers around dummy records REM.. at start of file cursor top fkey 3 cursor down 27 cursor at 0 fkey 3 REM.. and delete them fkey 7 REM.. set markers around dummy records REM.. at end of file cursor bottom fkey 3 cursor up 27 cursor at 0 fkey 3 REM.. and delete fkey 7 REM.. add endmarker to file type Z$+R$+R$ REM.. retrieve heading from segment 0 cursor top type segment 0 select segment 0 delete text select text endproc .TIME T%=TIME cls vdu10,10,10 print"TIME to SORT "; print str$C%+" RECORDS" print "was "+str$(T%DIV100)+"."; print str$(T%MOD100)+" seconds" G%=get endproc ================ REM.. D.COSORTD REM.. BY C J Waldock REM.. (C) The Micro User REM.. Sorts on code and date REM.. Reads records from disc, uses REM.. binary search for record place REM.. reset record counter C% C%=0 REM.. set constants REM.. R$=carriage return R$=chr$13 REM.. Z$=endmarker in file Z$=">END" procOPENFILE REM.. reset timer TIME=0 procHEAD procTAIL repeat procREAD procLOCATE until false .OPENFILE cls vdu10,10,10 print "ENTER FILE NAME TO BE SORTED" print "==>"; F$=glk$ F%=openinF$ print print "WORKING . ." print print "This may take a few minutes" endproc REM.. reserve heading in segment 0 .HEAD select segment 0 delete text REM.. read and save top four lines dothis type glf$F%+R$ times 4 endproc REM.. Set up start and end markers REM.. for sorting .TAIL select text delete text REM.. ASCII code "!" precedes all REM.. and ASCII code "~" follows all REM.. alphabetic characters REM.. build markers into dummy records Y$="!" procDUMMIES Y$="~" procDUMMIES endproc REM.. insert dummy records .DUMMIES dothis type ">" dothis type Y$+R$ times 9 times 3 endproc REM.. read first four lines of record REM.. from disc files .READ A$=glf$F% REM.. check for file end if A$=Z$ then goto END B$=glf$F% C$=glf$F% D$=glf$F% REM.. S$ is search string ("code") REM.. S$=field 1 + field 2 S$=A$+B$ REM.. increment record count C% C%=C%+1 REM.. set scope of search D% D%=C% endproc .LOCATE REM.. move to third dummy cursor top cursor down 18 .SEEK REM.. compare S$ with code in record if S$<glt$+glt$ then goto UP REM.. jump to next record cursor down 7 REM.. compare S$ with code in record ifS$>glt$+glt$ then goto DOWN cursor up 2 procINSERT display endproc REM.. S$ was "less than" code found REM.. so move back in records REM.. to look again .UP REM at each search scope D% is halved if D%>1 then D%=D%/2 cursor up(D%*9)+2 goto SEEK REM.. S$ was "greater than" code found REM.. so move forward in records REM.. to look again .DOWN REM at each search scope D% is halved if D%>1 then D%=D%/2 cursor down(D%*9)-2 goto SEEK REM.. add record to correct place .INSERT REM.. enter lines already read type A$+R$ type B$+R$ type C$+R$ type D$+R$ REM.. Read rest of record from disc REM.. and enter lines as read dothis type glf$F%+R$ times 5 endproc .END close#0 REM.. close file procTIDY procTIME display END .TIDY REM.. Set markers around dummy records REM.. at start of file cursor top fkey 3 cursor at 0 cursor down 27 fkey 3 REM.. and delete them fkey 7 REM.. Set markers around dummy records REM.. at end of file cursor bottom fkey 3 cursor up 27 cursor at 0 fkey 3 REM.. and delete fkey 7 REM.. add endmarker to file type Z$+R$+R$ REM.. retrieve heading from segment 0 cursor top type segment 0 select segment 0 delete text select text endproc .TIME T%=TIME cls vdu10,10,10 print"TIME to SORT "; print str$C%+" RECORDS" print "was "+str$(T%DIV100)+"."; print str$(T%MOD100)+" seconds" G%=get endproc ==================== REM.. D.COUNT REM.. BY C J Waldock REM.. (C) The Micro User REM.. Simple count of records REM.. first clear bottom of text select text cursor top find ">END" cursor down fkey 3 cursor bottom fkey 3 fkey 7 REM.. initialize record counter C% C%=0 REM.. count operation cursor top repeat find ">" cursor right C%=C%+1 until EOT REM.. Adjust C% for ">END" REM.. and subsequent seek C%=C%-2 REM.. advise result cursor bottom type STR$(C%)+" MEMBERS" display ==================== REM.. D.GLOBDEL REM.. BY C J Waldock REM.. (C) The Micro User REM.. Global delete of all records REM.. in text, with selected code REM.. set constant, carriage return R$=chr$13 REM.. reset record counter C%=0 select text cursor top REM.. Get file required REM.. and code for records to delete cls print print print print"DELETES ALL SELECTED RECORDS" print print" - ARE YOU SURE: Y/N? "; procOPTOUT cls print print print print"ENTER CODE(S) for records to be DELETED" print print"WILDCARD ""#"" may be used" print print"==> "; S$=glk$ if ascS$<>62 then procADD print print"OK - Y/N?"; procOPTOUT print print"DELETING RECORDS as requested" print print"Please wait a while . . ." REM.. deletion of records repeat find R$+S$ C%=C%+1 REM mark record fkey3 cursor down 9 fkey 3 PEM delete marked record fkey 7 until EOT REM.. adjust count for final search C%=C%-1 .END type R$+str$C%+" RECORDS CODED: " type S$+ " DELETED" display END .OPTOUT print" ==> "; Z$=gck$ printZ$ ifZ$="y" then Z$="Y" ifZ$<>"Y"then goto END endproc .ADD S$=">"+S$ print print"corrected to: "+S$ endproc ===================
00000000 52 45 4d 2e 2e 20 44 2e 41 4e 41 4c 59 5a 45 0d |REM.. D.ANALYZE.| 00000010 52 45 4d 2e 2e 20 42 59 20 43 20 4a 20 57 61 6c |REM.. BY C J Wal| 00000020 64 6f 63 6b 0d 52 45 4d 2e 2e 20 28 43 29 20 54 |dock.REM.. (C) T| 00000030 68 65 20 4d 69 63 72 6f 20 55 73 65 72 0d 52 45 |he Micro User.RE| 00000040 4d 2e 2e 20 75 73 65 20 43 4f 53 4f 52 54 44 20 |M.. use COSORTD | 00000050 66 69 72 73 74 0d 52 45 4d 2e 2e 20 61 6e 64 20 |first.REM.. and | 00000060 6c 65 61 76 65 20 73 6f 72 74 65 64 20 66 69 6c |leave sorted fil| 00000070 65 20 69 6e 20 54 45 58 54 0d 0d 52 45 4d 2e 2e |e in TEXT..REM..| 00000080 20 72 65 73 65 74 20 74 6f 74 61 6c 0d 20 54 25 | reset total. T%| 00000090 3d 30 0d 52 45 4d 2e 2e 20 64 65 66 69 6e 65 20 |=0.REM.. define | 000000a0 63 6f 6e 73 74 61 6e 74 2c 20 63 61 72 72 69 61 |constant, carria| 000000b0 67 65 20 72 65 74 75 72 6e 0d 20 52 24 3d 63 2e |ge return. R$=c.| 000000c0 31 33 0d 0d 73 65 6c 65 63 74 20 74 65 78 74 0d |13..select text.| 000000d0 0d 72 65 70 65 61 74 0d 20 70 72 6f 63 50 49 43 |.repeat. procPIC| 000000e0 4b 55 50 0d 20 70 72 6f 63 43 4f 55 4e 54 0d 75 |KUP. procCOUNT.u| 000000f0 6e 74 69 6c 20 66 61 6c 73 65 0d 0d 64 69 73 70 |ntil false..disp| 00000100 6c 61 79 0d 45 4e 44 0d 0d 2e 50 49 43 4b 55 50 |lay.END...PICKUP| 00000110 0d 20 73 65 6c 65 63 74 20 74 65 78 74 0d 20 63 |. select text. c| 00000120 75 72 73 6f 72 20 74 6f 70 0d 20 52 45 4d 2e 2e |ursor top. REM..| 00000130 20 66 69 6e 64 20 66 69 72 73 74 20 75 6e 72 65 | find first unre| 00000140 76 65 72 73 65 64 20 6d 61 72 6b 65 72 0d 20 20 |versed marker. | 00000150 66 69 6e 64 22 3e 22 0d 20 20 53 24 3d 67 6c 74 |find">". S$=glt| 00000160 24 0d 20 52 45 4d 2e 2e 20 6c 6f 6f 6b 20 66 6f |$. REM.. look fo| 00000170 72 20 65 6e 64 20 6d 61 72 6b 65 72 0d 20 20 69 |r end marker. i| 00000180 66 20 53 24 3d 22 3e 45 4e 44 22 20 74 2e 67 2e |f S$=">END" t.g.| 00000190 45 4e 44 0d 20 52 45 4d 2e 2e 20 73 65 74 20 75 |END. REM.. set u| 000001a0 70 20 73 65 61 72 63 68 20 73 74 72 69 6e 67 0d |p search string.| 000001b0 20 20 53 24 3d 53 24 2b 52 24 2b 67 63 74 24 2b | S$=S$+R$+gct$+| 000001c0 67 63 74 24 0d 20 52 45 4d 2e 2e 20 67 6f 20 62 |gct$. REM.. go b| 000001d0 61 63 6b 20 74 6f 20 72 65 76 65 72 73 65 20 72 |ack to reverse r| 000001e0 65 63 6f 72 64 20 6d 61 72 6b 65 72 0d 20 20 63 |ecord marker. c| 000001f0 75 72 73 6f 72 20 61 74 20 30 0d 20 20 63 75 72 |ursor at 0. cur| 00000200 73 6f 72 20 75 70 0d 20 20 72 65 70 6c 2e 22 3e |sor up. repl.">| 00000210 22 2c 22 3c 22 0d 20 52 45 4d 2e 2e 20 73 74 61 |","<". REM.. sta| 00000220 72 74 20 63 6f 75 6e 74 20 43 25 0d 20 20 43 25 |rt count C%. C%| 00000230 3d 31 0d 65 6e 64 70 72 6f 63 0d 0d 2e 43 4f 55 |=1.endproc...COU| 00000240 4e 54 0d 20 72 65 70 65 61 74 0d 20 20 52 45 4d |NT. repeat. REM| 00000250 2e 2e 20 6c 6f 6f 6b 20 66 6f 72 20 73 74 72 69 |.. look for stri| 00000260 6e 67 0d 20 20 20 66 69 6e 64 20 53 24 0d 20 20 |ng. find S$. | 00000270 52 45 4d 2e 2e 20 72 65 76 65 72 73 65 20 6d 61 |REM.. reverse ma| 00000280 72 6b 65 72 0d 20 20 20 72 65 70 6c 61 63 65 22 |rker. replace"| 00000290 3e 22 2c 22 3c 22 0d 20 52 45 4d 2e 2e 20 69 6e |>","<". REM.. in| 000002a0 63 72 65 6d 65 6e 74 20 63 6f 75 6e 74 65 72 20 |crement counter | 000002b0 66 6f 72 20 74 68 69 73 20 63 6c 61 73 73 0d 20 |for this class. | 000002c0 20 20 43 25 3d 43 25 2b 31 0d 20 75 6e 74 69 6c | C%=C%+1. until| 000002d0 20 45 4f 54 20 20 0d 20 20 52 45 4d 2e 2e 20 61 | EOT . REM.. a| 000002e0 64 6a 75 73 74 20 63 6f 75 6e 74 65 72 0d 20 20 |djust counter. | 000002f0 20 43 25 3d 43 25 2d 31 0d 20 20 52 45 4d 2e 2e | C%=C%-1. REM..| 00000300 20 61 64 64 20 63 6c 61 73 73 20 63 6f 75 6e 74 | add class count| 00000310 20 74 6f 20 74 6f 74 61 6c 20 63 6f 75 6e 74 0d | to total count.| 00000320 20 20 20 54 25 3d 54 25 2b 43 25 0d 20 20 52 45 | T%=T%+C%. RE| 00000330 4d 2e 2e 20 61 64 64 20 63 6c 61 73 73 20 74 6f |M.. add class to| 00000340 74 61 6c 20 74 6f 20 72 65 63 6f 72 64 0d 20 20 |tal to record. | 00000350 20 70 72 6f 63 52 45 43 4f 52 44 0d 65 6e 64 70 | procRECORD.endp| 00000360 72 6f 63 0d 0d 2e 52 45 43 4f 52 44 0d 20 73 65 |roc...RECORD. se| 00000370 6c 65 63 74 20 73 65 67 6d 65 6e 74 20 31 0d 20 |lect segment 1. | 00000380 74 79 70 65 20 53 24 2b 22 3a 20 20 22 2b 73 74 |type S$+": "+st| 00000390 72 24 43 25 0d 20 74 79 70 65 20 22 20 6d 65 6d |r$C%. type " mem| 000003a0 62 65 72 28 73 29 22 2b 52 24 2b 52 24 0d 20 64 |ber(s)"+R$+R$. d| 000003b0 69 73 70 6c 61 79 0d 65 6e 64 70 72 6f 63 0d 0d |isplay.endproc..| 000003c0 2e 45 4e 44 0d 20 73 65 6c 65 63 74 20 73 65 67 |.END. select seg| 000003d0 6d 65 6e 74 20 31 0d 20 74 79 70 65 22 54 4f 54 |ment 1. type"TOT| 000003e0 41 4c 20 4f 46 20 4d 45 4d 42 45 52 53 3a 20 22 |AL OF MEMBERS: "| 000003f0 2b 53 54 52 24 54 25 2b 52 24 2b 52 24 0d 20 52 |+STR$T%+R$+R$. R| 00000400 45 4d 2e 2e 20 63 6f 72 72 65 63 74 20 72 65 76 |EM.. correct rev| 00000410 65 72 73 65 64 20 72 65 63 6f 72 64 20 6d 61 72 |ersed record mar| 00000420 6b 65 72 73 0d 20 20 73 65 6c 65 63 74 20 74 65 |kers. select te| 00000430 78 74 0d 20 20 63 75 72 73 6f 72 20 74 6f 70 0d |xt. cursor top.| 00000440 20 20 72 65 70 65 61 74 0d 20 20 20 72 65 70 6c | repeat. repl| 00000450 61 63 65 22 3c 22 2c 22 3e 22 0d 20 20 75 6e 74 |ace"<",">". unt| 00000460 69 6c 20 45 4f 54 0d 20 73 65 6c 65 63 74 20 73 |il EOT. select s| 00000470 65 67 6d 65 6e 74 20 31 0d 20 64 69 73 70 6c 61 |egment 1. displa| 00000480 79 0d 45 4e 44 0d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |y.END.==========| 00000490 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0d 52 45 |=============.RE| 000004a0 4d 2e 2e 20 44 2e 42 49 53 4f 52 54 44 0d 52 45 |M.. D.BISORTD.RE| 000004b0 4d 2e 2e 20 42 59 20 43 20 4a 20 57 61 6c 64 6f |M.. BY C J Waldo| 000004c0 63 6b 0d 52 45 4d 2e 2e 20 28 43 29 20 54 68 65 |ck.REM.. (C) The| 000004d0 20 4d 69 63 72 6f 20 55 73 65 72 0d 52 45 4d 2e | Micro User.REM.| 000004e0 2e 20 52 65 61 64 73 20 72 65 63 6f 72 64 73 20 |. Reads records | 000004f0 66 72 6f 6d 20 64 69 73 63 2c 20 75 73 65 73 0d |from disc, uses.| 00000500 52 45 4d 2e 2e 20 62 69 6e 61 72 79 20 73 65 61 |REM.. binary sea| 00000510 72 63 68 20 66 6f 72 20 72 65 63 6f 72 64 20 70 |rch for record p| 00000520 6c 61 63 65 0d 0d 52 45 4d 2e 2e 20 72 65 73 65 |lace..REM.. rese| 00000530 74 20 72 65 63 6f 72 64 20 63 6f 75 6e 74 65 72 |t record counter| 00000540 20 43 25 0d 20 43 25 3d 30 0d 52 45 4d 2e 2e 20 | C%. C%=0.REM.. | 00000550 73 65 74 20 63 6f 6e 73 74 61 6e 74 73 0d 52 45 |set constants.RE| 00000560 4d 2e 2e 20 52 24 3d 63 61 72 72 69 61 67 65 20 |M.. R$=carriage | 00000570 72 65 74 75 72 6e 0d 20 52 24 3d 63 68 72 24 31 |return. R$=chr$1| 00000580 33 0d 52 45 4d 2e 2e 20 5a 24 3d 65 6e 64 6d 61 |3.REM.. Z$=endma| 00000590 72 6b 65 72 20 69 6e 20 66 69 6c 65 0d 20 5a 24 |rker in file. Z$| 000005a0 3d 22 3e 45 4e 44 22 0d 0d 20 70 72 6f 63 4f 50 |=">END".. procOP| 000005b0 45 4e 46 49 4c 45 0d 0d 52 45 4d 2e 2e 20 72 65 |ENFILE..REM.. re| 000005c0 73 65 74 20 74 69 6d 65 72 0d 20 54 49 4d 45 3d |set timer. TIME=| 000005d0 30 0d 0d 20 70 72 6f 63 48 45 41 44 0d 20 70 72 |0.. procHEAD. pr| 000005e0 6f 63 54 41 49 4c 0d 0d 72 65 70 65 61 74 0d 20 |ocTAIL..repeat. | 000005f0 70 72 6f 63 52 45 41 44 0d 20 70 72 6f 63 4c 4f |procREAD. procLO| 00000600 43 41 54 45 0d 75 6e 74 69 6c 20 66 61 6c 73 65 |CATE.until false| 00000610 0d 0d 2e 4f 50 45 4e 46 49 4c 45 0d 20 63 6c 73 |...OPENFILE. cls| 00000620 0d 20 76 64 75 31 30 2c 31 30 2c 31 30 0d 20 70 |. vdu10,10,10. p| 00000630 72 69 6e 74 20 22 45 4e 54 45 52 20 46 49 4c 45 |rint "ENTER FILE| 00000640 20 4e 41 4d 45 20 54 4f 20 42 45 20 53 4f 52 54 | NAME TO BE SORT| 00000650 45 44 22 0d 20 70 72 69 6e 74 20 22 3d 3d 3e 22 |ED". print "==>"| 00000660 3b 0d 20 46 24 3d 67 6c 6b 24 0d 20 46 25 3d 6f |;. F$=glk$. F%=o| 00000670 70 65 6e 69 6e 46 24 0d 20 70 72 69 6e 74 0d 20 |peninF$. print. | 00000680 70 72 69 6e 74 20 22 57 4f 52 4b 49 4e 47 20 2e |print "WORKING .| 00000690 20 2e 22 0d 20 70 72 69 6e 74 0d 20 70 72 69 6e | .". print. prin| 000006a0 74 20 22 54 68 69 73 20 6d 61 79 20 74 61 6b 65 |t "This may take| 000006b0 20 61 20 66 65 77 20 6d 69 6e 75 74 65 73 22 0d | a few minutes".| 000006c0 65 6e 64 70 72 6f 63 0d 0d 52 45 4d 2e 2e 20 72 |endproc..REM.. r| 000006d0 65 73 65 72 76 65 20 68 65 61 64 69 6e 67 20 69 |eserve heading i| 000006e0 6e 20 73 65 67 6d 65 6e 74 20 30 0d 2e 48 45 41 |n segment 0..HEA| 000006f0 44 0d 20 73 65 6c 65 63 74 20 73 65 67 6d 65 6e |D. select segmen| 00000700 74 20 30 0d 20 64 65 6c 65 74 65 20 74 65 78 74 |t 0. delete text| 00000710 0d 20 52 45 4d 2e 2e 20 72 65 61 64 20 61 6e 64 |. REM.. read and| 00000720 20 73 61 76 65 20 74 6f 70 20 66 6f 75 72 20 6c | save top four l| 00000730 69 6e 65 73 0d 20 64 6f 74 68 69 73 0d 20 20 74 |ines. dothis. t| 00000740 79 70 65 20 67 6c 66 24 46 25 2b 52 24 0d 20 74 |ype glf$F%+R$. t| 00000750 69 6d 65 73 20 34 0d 65 6e 64 70 72 6f 63 0d 0d |imes 4.endproc..| 00000760 52 45 4d 2e 2e 20 53 65 74 20 75 70 20 73 74 61 |REM.. Set up sta| 00000770 72 74 20 61 6e 64 20 65 6e 64 20 6d 61 72 6b 65 |rt and end marke| 00000780 72 73 0d 52 45 4d 2e 2e 20 66 6f 72 20 73 6f 72 |rs.REM.. for sor| 00000790 74 69 6e 67 0d 2e 54 41 49 4c 0d 20 73 65 6c 65 |ting..TAIL. sele| 000007a0 63 74 20 74 65 78 74 0d 20 64 65 6c 65 74 65 20 |ct text. delete | 000007b0 74 65 78 74 0d 20 52 45 4d 2e 2e 20 41 53 43 49 |text. REM.. ASCI| 000007c0 49 20 63 6f 64 65 20 22 21 22 20 70 72 65 63 65 |I code "!" prece| 000007d0 64 65 73 20 61 6c 6c 0d 20 52 45 4d 2e 2e 20 20 |des all. REM.. | 000007e0 61 6e 64 20 41 53 43 49 49 20 63 6f 64 65 20 22 |and ASCII code "| 000007f0 7e 22 20 66 6f 6c 6c 6f 77 73 20 61 6c 6c 0d 20 |~" follows all. | 00000800 52 45 4d 2e 2e 20 20 61 6c 70 68 61 62 65 74 69 |REM.. alphabeti| 00000810 63 20 63 68 61 72 61 63 74 65 72 73 0d 20 52 45 |c characters. RE| 00000820 4d 2e 2e 20 42 75 69 6c 64 20 6d 61 72 6b 65 72 |M.. Build marker| 00000830 73 20 69 6e 74 6f 20 64 75 6d 6d 79 20 72 65 63 |s into dummy rec| 00000840 6f 72 64 73 0d 20 20 59 24 3d 22 21 22 0d 20 20 |ords. Y$="!". | 00000850 70 72 6f 63 44 55 4d 4d 49 45 53 0d 20 20 59 24 |procDUMMIES. Y$| 00000860 3d 22 7e 22 20 20 0d 20 20 70 72 6f 63 44 55 4d |="~" . procDUM| 00000870 4d 49 45 53 0d 65 6e 64 70 72 6f 63 0d 0d 52 45 |MIES.endproc..RE| 00000880 4d 2e 2e 20 69 6e 73 65 72 74 20 64 75 6d 6d 79 |M.. insert dummy| 00000890 20 72 65 63 6f 72 64 73 0d 2e 44 55 4d 4d 49 45 | records..DUMMIE| 000008a0 53 0d 20 64 6f 74 68 69 73 0d 20 20 74 79 70 65 |S. dothis. type| 000008b0 20 22 3e 22 0d 20 20 64 6f 74 68 69 73 0d 20 20 | ">". dothis. | 000008c0 20 74 79 70 65 20 59 24 2b 52 24 0d 20 20 74 69 | type Y$+R$. ti| 000008d0 6d 65 73 20 39 0d 20 74 69 6d 65 73 20 33 0d 65 |mes 9. times 3.e| 000008e0 6e 64 70 72 6f 63 0d 0d 52 45 4d 2e 2e 20 72 65 |ndproc..REM.. re| 000008f0 61 64 20 66 69 72 73 74 20 66 6f 75 72 20 6c 69 |ad first four li| 00000900 6e 65 73 20 6f 66 20 72 65 63 6f 72 64 0d 2e 52 |nes of record..R| 00000910 45 41 44 0d 20 41 24 3d 67 6c 66 24 46 25 0d 20 |EAD. A$=glf$F%. | 00000920 52 45 4d 2e 2e 20 63 68 65 63 6b 20 66 6f 72 20 |REM.. check for | 00000930 66 69 6c 65 20 65 6e 64 0d 20 20 69 66 20 41 24 |file end. if A$| 00000940 3d 5a 24 20 74 68 65 6e 20 67 6f 74 6f 20 45 4e |=Z$ then goto EN| 00000950 44 0d 20 42 24 3d 67 6c 66 24 46 25 0d 20 43 24 |D. B$=glf$F%. C$| 00000960 3d 67 6c 66 24 46 25 0d 20 44 24 3d 67 6c 66 24 |=glf$F%. D$=glf$| 00000970 46 25 0d 20 52 45 4d 2e 2e 20 53 24 3d 73 75 72 |F%. REM.. S$=sur| 00000980 6e 61 6d 65 2b 66 6f 72 65 6e 61 6d 65 0d 20 20 |name+forename. | 00000990 53 24 3d 43 24 2b 44 24 0d 20 52 45 4d 2e 2e 20 |S$=C$+D$. REM.. | 000009a0 69 6e 63 72 65 6d 65 6e 74 20 72 65 63 6f 72 64 |increment record| 000009b0 20 63 6f 75 6e 74 20 43 25 0d 20 20 43 25 3d 43 | count C%. C%=C| 000009c0 25 2b 31 0d 20 52 45 4d 2e 2e 20 73 65 74 20 73 |%+1. REM.. set s| 000009d0 63 6f 70 65 20 6f 66 20 73 65 61 72 63 68 20 44 |cope of search D| 000009e0 25 0d 20 20 44 25 3d 43 25 0d 65 6e 64 70 72 6f |%. D%=C%.endpro| 000009f0 63 0d 0d 2e 4c 4f 43 41 54 45 0d 20 52 45 4d 2e |c...LOCATE. REM.| 00000a00 2e 20 6d 6f 76 65 20 74 6f 20 74 68 69 72 64 20 |. move to third | 00000a10 64 75 6d 6d 79 0d 20 20 63 75 72 73 6f 72 20 74 |dummy. cursor t| 00000a20 6f 70 0d 20 20 63 75 72 73 6f 72 20 64 6f 77 6e |op. cursor down| 00000a30 20 32 30 0d 2e 53 45 45 4b 0d 20 52 45 4d 20 61 | 20..SEEK. REM a| 00000a40 74 20 65 61 63 68 20 73 65 61 72 63 68 20 73 63 |t each search sc| 00000a50 6f 70 65 20 44 25 20 69 73 20 68 61 6c 76 65 64 |ope D% is halved| 00000a60 0d 20 20 20 69 66 20 44 25 3e 31 20 74 68 65 6e |. if D%>1 then| 00000a70 20 44 25 3d 44 25 2f 32 0d 20 52 45 4d 2e 2e 20 | D%=D%/2. REM.. | 00000a80 63 6f 6d 70 61 72 65 20 53 24 20 77 69 74 68 20 |compare S$ with | 00000a90 6e 61 6d 65 20 69 6e 20 72 65 63 6f 72 64 0d 20 |name in record. | 00000aa0 20 20 69 66 20 53 24 3c 67 6c 74 24 2b 67 6c 74 | if S$<glt$+glt| 00000ab0 24 20 74 68 65 6e 20 67 6f 74 6f 20 55 50 0d 20 |$ then goto UP. | 00000ac0 52 45 4d 2e 2e 20 6a 75 6d 70 20 74 6f 20 6e 65 |REM.. jump to ne| 00000ad0 78 74 20 72 65 63 6f 72 64 0d 20 20 63 75 72 73 |xt record. curs| 00000ae0 6f 72 20 64 6f 77 6e 20 37 0d 20 52 45 4d 2e 2e |or down 7. REM..| 00000af0 20 63 6f 6d 70 61 72 65 20 53 24 20 77 69 74 68 | compare S$ with| 00000b00 20 6e 61 6d 65 20 69 6e 20 72 65 63 6f 72 64 0d | name in record.| 00000b10 20 20 20 69 66 53 24 3e 67 6c 74 24 2b 67 6c 74 | ifS$>glt$+glt| 00000b20 24 20 74 68 65 6e 20 67 6f 74 6f 20 44 4f 57 4e |$ then goto DOWN| 00000b30 0d 20 63 75 72 73 6f 72 20 75 70 20 34 0d 20 70 |. cursor up 4. p| 00000b40 72 6f 63 49 4e 53 45 52 54 0d 20 64 69 73 70 6c |rocINSERT. displ| 00000b50 61 79 0d 65 6e 64 70 72 6f 63 0d 0d 52 45 4d 2e |ay.endproc..REM.| 00000b60 2e 20 53 24 20 77 61 73 20 22 6c 65 73 73 20 74 |. S$ was "less t| 00000b70 68 61 6e 22 20 6e 61 6d 65 20 66 6f 75 6e 64 0d |han" name found.| 00000b80 52 45 4d 2e 2e 20 73 6f 20 6d 6f 76 65 20 62 61 |REM.. so move ba| 00000b90 63 6b 20 69 6e 20 72 65 63 6f 72 64 73 0d 52 45 |ck in records.RE| 00000ba0 4d 2e 2e 20 74 6f 20 6c 6f 6f 6b 20 61 67 61 69 |M.. to look agai| 00000bb0 6e 0d 2e 55 50 0d 20 63 75 72 73 6f 72 20 75 70 |n..UP. cursor up| 00000bc0 28 44 25 2a 39 29 2b 32 0d 67 6f 74 6f 20 53 45 |(D%*9)+2.goto SE| 00000bd0 45 4b 0d 0d 52 45 4d 2e 2e 20 53 24 20 77 61 73 |EK..REM.. S$ was| 00000be0 20 22 67 72 65 61 74 65 72 20 74 68 61 6e 22 20 | "greater than" | 00000bf0 6e 61 6d 65 20 66 6f 75 6e 64 0d 52 45 4d 2e 2e |name found.REM..| 00000c00 20 73 6f 20 6d 6f 76 65 20 66 6f 72 77 61 72 64 | so move forward| 00000c10 20 69 6e 20 72 65 63 6f 72 64 73 0d 52 45 4d 2e | in records.REM.| 00000c20 2e 20 74 6f 20 6c 6f 6f 6b 20 61 67 61 69 6e 0d |. to look again.| 00000c30 2e 44 4f 57 4e 0d 20 63 75 72 73 6f 72 20 75 70 |.DOWN. cursor up| 00000c40 20 32 0d 20 63 75 72 73 6f 72 20 64 6f 77 6e 28 | 2. cursor down(| 00000c50 44 25 2a 39 29 0d 67 6f 74 6f 20 53 45 45 4b 0d |D%*9).goto SEEK.| 00000c60 0d 52 45 4d 2e 2e 20 61 64 64 20 72 65 63 6f 72 |.REM.. add recor| 00000c70 64 20 74 6f 20 63 6f 72 72 65 63 74 20 70 6c 61 |d to correct pla| 00000c80 63 65 0d 2e 49 4e 53 45 52 54 0d 52 45 4d 2e 2e |ce..INSERT.REM..| 00000c90 20 65 6e 74 65 72 20 6c 69 6e 65 73 20 61 6c 72 | enter lines alr| 00000ca0 65 61 64 79 20 72 65 61 64 0d 20 74 79 70 65 20 |eady read. type | 00000cb0 41 24 2b 52 24 0d 20 74 79 70 65 20 42 24 2b 52 |A$+R$. type B$+R| 00000cc0 24 0d 20 74 79 70 65 20 43 24 2b 52 24 0d 20 74 |$. type C$+R$. t| 00000cd0 79 70 65 20 44 24 2b 52 24 0d 52 45 4d 2e 2e 20 |ype D$+R$.REM.. | 00000ce0 72 65 61 64 20 72 65 73 74 20 6f 66 20 72 65 63 |read rest of rec| 00000cf0 6f 72 64 20 66 72 6f 6d 20 64 69 73 63 0d 52 45 |ord from disc.RE| 00000d00 4d 2e 2e 20 61 6e 64 20 65 6e 74 65 72 20 6c 69 |M.. and enter li| 00000d10 6e 65 73 20 61 73 20 72 65 61 64 0d 20 64 6f 74 |nes as read. dot| 00000d20 68 69 73 0d 20 20 74 79 70 65 20 67 6c 66 24 46 |his. type glf$F| 00000d30 25 2b 52 24 0d 20 74 69 6d 65 73 20 35 0d 65 6e |%+R$. times 5.en| 00000d40 64 70 72 6f 63 20 0d 0d 2e 45 4e 44 0d 63 6c 6f |dproc ...END.clo| 00000d50 73 65 23 30 0d 70 72 6f 63 54 49 44 59 0d 70 72 |se#0.procTIDY.pr| 00000d60 6f 63 54 49 4d 45 0d 64 69 73 70 6c 61 79 0d 45 |ocTIME.display.E| 00000d70 4e 44 0d 0d 2e 54 49 44 59 0d 52 45 4d 2e 2e 20 |ND...TIDY.REM.. | 00000d80 73 65 74 20 6d 61 72 6b 65 72 73 20 61 72 6f 75 |set markers arou| 00000d90 6e 64 20 64 75 6d 6d 79 20 72 65 63 6f 72 64 73 |nd dummy records| 00000da0 0d 52 45 4d 2e 2e 20 61 74 20 73 74 61 72 74 20 |.REM.. at start | 00000db0 6f 66 20 66 69 6c 65 0d 20 63 75 72 73 6f 72 20 |of file. cursor | 00000dc0 74 6f 70 0d 20 66 6b 65 79 20 33 0d 20 63 75 72 |top. fkey 3. cur| 00000dd0 73 6f 72 20 64 6f 77 6e 20 32 37 0d 20 63 75 72 |sor down 27. cur| 00000de0 73 6f 72 20 61 74 20 30 0d 20 66 6b 65 79 20 33 |sor at 0. fkey 3| 00000df0 0d 52 45 4d 2e 2e 20 61 6e 64 20 64 65 6c 65 74 |.REM.. and delet| 00000e00 65 20 74 68 65 6d 0d 20 66 6b 65 79 20 37 0d 52 |e them. fkey 7.R| 00000e10 45 4d 2e 2e 20 73 65 74 20 6d 61 72 6b 65 72 73 |EM.. set markers| 00000e20 20 61 72 6f 75 6e 64 20 64 75 6d 6d 79 20 72 65 | around dummy re| 00000e30 63 6f 72 64 73 0d 52 45 4d 2e 2e 20 61 74 20 65 |cords.REM.. at e| 00000e40 6e 64 20 6f 66 20 66 69 6c 65 0d 20 63 75 72 73 |nd of file. curs| 00000e50 6f 72 20 62 6f 74 74 6f 6d 0d 20 66 6b 65 79 20 |or bottom. fkey | 00000e60 33 0d 20 63 75 72 73 6f 72 20 75 70 20 32 37 0d |3. cursor up 27.| 00000e70 20 63 75 72 73 6f 72 20 61 74 20 30 0d 20 66 6b | cursor at 0. fk| 00000e80 65 79 20 33 0d 52 45 4d 2e 2e 20 61 6e 64 20 64 |ey 3.REM.. and d| 00000e90 65 6c 65 74 65 0d 20 66 6b 65 79 20 37 0d 52 45 |elete. fkey 7.RE| 00000ea0 4d 2e 2e 20 61 64 64 20 65 6e 64 6d 61 72 6b 65 |M.. add endmarke| 00000eb0 72 20 74 6f 20 66 69 6c 65 0d 20 74 79 70 65 20 |r to file. type | 00000ec0 5a 24 2b 52 24 2b 52 24 0d 52 45 4d 2e 2e 20 72 |Z$+R$+R$.REM.. r| 00000ed0 65 74 72 69 65 76 65 20 68 65 61 64 69 6e 67 20 |etrieve heading | 00000ee0 66 72 6f 6d 20 73 65 67 6d 65 6e 74 20 30 0d 20 |from segment 0. | 00000ef0 63 75 72 73 6f 72 20 74 6f 70 0d 20 74 79 70 65 |cursor top. type| 00000f00 20 73 65 67 6d 65 6e 74 20 30 0d 20 73 65 6c 65 | segment 0. sele| 00000f10 63 74 20 73 65 67 6d 65 6e 74 20 30 0d 20 64 65 |ct segment 0. de| 00000f20 6c 65 74 65 20 74 65 78 74 0d 20 73 65 6c 65 63 |lete text. selec| 00000f30 74 20 74 65 78 74 0d 65 6e 64 70 72 6f 63 0d 0d |t text.endproc..| 00000f40 2e 54 49 4d 45 0d 20 54 25 3d 54 49 4d 45 0d 20 |.TIME. T%=TIME. | 00000f50 63 6c 73 0d 20 76 64 75 31 30 2c 31 30 2c 31 30 |cls. vdu10,10,10| 00000f60 0d 20 70 72 69 6e 74 22 54 49 4d 45 20 74 6f 20 |. print"TIME to | 00000f70 53 4f 52 54 20 22 3b 0d 20 70 72 69 6e 74 20 73 |SORT ";. print s| 00000f80 74 72 24 43 25 2b 22 20 52 45 43 4f 52 44 53 22 |tr$C%+" RECORDS"| 00000f90 0d 20 70 72 69 6e 74 20 22 77 61 73 20 22 2b 73 |. print "was "+s| 00000fa0 74 72 24 28 54 25 44 49 56 31 30 30 29 2b 22 2e |tr$(T%DIV100)+".| 00000fb0 22 3b 0d 20 70 72 69 6e 74 20 73 74 72 24 28 54 |";. print str$(T| 00000fc0 25 4d 4f 44 31 30 30 29 2b 22 20 73 65 63 6f 6e |%MOD100)+" secon| 00000fd0 64 73 22 0d 20 47 25 3d 67 65 74 0d 65 6e 64 70 |ds". G%=get.endp| 00000fe0 72 6f 63 0d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |roc.============| 00000ff0 3d 3d 3d 3d 0d 52 45 4d 2e 2e 20 44 2e 43 4f 53 |====.REM.. D.COS| 00001000 4f 52 54 44 0d 52 45 4d 2e 2e 20 42 59 20 43 20 |ORTD.REM.. BY C | 00001010 4a 20 57 61 6c 64 6f 63 6b 0d 52 45 4d 2e 2e 20 |J Waldock.REM.. | 00001020 28 43 29 20 54 68 65 20 4d 69 63 72 6f 20 55 73 |(C) The Micro Us| 00001030 65 72 0d 52 45 4d 2e 2e 20 53 6f 72 74 73 20 6f |er.REM.. Sorts o| 00001040 6e 20 63 6f 64 65 20 61 6e 64 20 64 61 74 65 0d |n code and date.| 00001050 52 45 4d 2e 2e 20 52 65 61 64 73 20 72 65 63 6f |REM.. Reads reco| 00001060 72 64 73 20 66 72 6f 6d 20 64 69 73 63 2c 20 75 |rds from disc, u| 00001070 73 65 73 0d 52 45 4d 2e 2e 20 20 62 69 6e 61 72 |ses.REM.. binar| 00001080 79 20 73 65 61 72 63 68 20 66 6f 72 20 72 65 63 |y search for rec| 00001090 6f 72 64 20 70 6c 61 63 65 0d 0d 52 45 4d 2e 2e |ord place..REM..| 000010a0 20 72 65 73 65 74 20 72 65 63 6f 72 64 20 63 6f | reset record co| 000010b0 75 6e 74 65 72 20 43 25 0d 20 43 25 3d 30 0d 52 |unter C%. C%=0.R| 000010c0 45 4d 2e 2e 20 73 65 74 20 63 6f 6e 73 74 61 6e |EM.. set constan| 000010d0 74 73 0d 52 45 4d 2e 2e 20 52 24 3d 63 61 72 72 |ts.REM.. R$=carr| 000010e0 69 61 67 65 20 72 65 74 75 72 6e 0d 20 52 24 3d |iage return. R$=| 000010f0 63 68 72 24 31 33 0d 52 45 4d 2e 2e 20 5a 24 3d |chr$13.REM.. Z$=| 00001100 65 6e 64 6d 61 72 6b 65 72 20 69 6e 20 66 69 6c |endmarker in fil| 00001110 65 0d 20 5a 24 3d 22 3e 45 4e 44 22 0d 0d 20 70 |e. Z$=">END".. p| 00001120 72 6f 63 4f 50 45 4e 46 49 4c 45 0d 0d 52 45 4d |rocOPENFILE..REM| 00001130 2e 2e 20 72 65 73 65 74 20 74 69 6d 65 72 0d 20 |.. reset timer. | 00001140 54 49 4d 45 3d 30 0d 0d 20 70 72 6f 63 48 45 41 |TIME=0.. procHEA| 00001150 44 0d 20 70 72 6f 63 54 41 49 4c 0d 0d 72 65 70 |D. procTAIL..rep| 00001160 65 61 74 0d 20 70 72 6f 63 52 45 41 44 0d 20 70 |eat. procREAD. p| 00001170 72 6f 63 4c 4f 43 41 54 45 0d 75 6e 74 69 6c 20 |rocLOCATE.until | 00001180 66 61 6c 73 65 0d 0d 2e 4f 50 45 4e 46 49 4c 45 |false...OPENFILE| 00001190 0d 20 63 6c 73 0d 20 76 64 75 31 30 2c 31 30 2c |. cls. vdu10,10,| 000011a0 31 30 0d 20 70 72 69 6e 74 20 22 45 4e 54 45 52 |10. print "ENTER| 000011b0 20 46 49 4c 45 20 4e 41 4d 45 20 54 4f 20 42 45 | FILE NAME TO BE| 000011c0 20 53 4f 52 54 45 44 22 0d 20 70 72 69 6e 74 20 | SORTED". print | 000011d0 22 3d 3d 3e 22 3b 0d 20 46 24 3d 67 6c 6b 24 0d |"==>";. F$=glk$.| 000011e0 20 46 25 3d 6f 70 65 6e 69 6e 46 24 0d 20 70 72 | F%=openinF$. pr| 000011f0 69 6e 74 0d 20 70 72 69 6e 74 20 22 57 4f 52 4b |int. print "WORK| 00001200 49 4e 47 20 2e 20 2e 22 0d 20 70 72 69 6e 74 0d |ING . .". print.| 00001210 20 70 72 69 6e 74 20 22 54 68 69 73 20 6d 61 79 | print "This may| 00001220 20 74 61 6b 65 20 61 20 66 65 77 20 6d 69 6e 75 | take a few minu| 00001230 74 65 73 22 0d 65 6e 64 70 72 6f 63 0d 0d 52 45 |tes".endproc..RE| 00001240 4d 2e 2e 20 72 65 73 65 72 76 65 20 68 65 61 64 |M.. reserve head| 00001250 69 6e 67 20 69 6e 20 73 65 67 6d 65 6e 74 20 30 |ing in segment 0| 00001260 0d 2e 48 45 41 44 0d 20 73 65 6c 65 63 74 20 73 |..HEAD. select s| 00001270 65 67 6d 65 6e 74 20 30 0d 20 64 65 6c 65 74 65 |egment 0. delete| 00001280 20 74 65 78 74 0d 20 52 45 4d 2e 2e 20 72 65 61 | text. REM.. rea| 00001290 64 20 61 6e 64 20 73 61 76 65 20 74 6f 70 20 66 |d and save top f| 000012a0 6f 75 72 20 6c 69 6e 65 73 0d 20 64 6f 74 68 69 |our lines. dothi| 000012b0 73 0d 20 20 74 79 70 65 20 67 6c 66 24 46 25 2b |s. type glf$F%+| 000012c0 52 24 0d 20 74 69 6d 65 73 20 34 0d 65 6e 64 70 |R$. times 4.endp| 000012d0 72 6f 63 0d 0d 52 45 4d 2e 2e 20 53 65 74 20 75 |roc..REM.. Set u| 000012e0 70 20 73 74 61 72 74 20 61 6e 64 20 65 6e 64 20 |p start and end | 000012f0 6d 61 72 6b 65 72 73 0d 52 45 4d 2e 2e 20 20 66 |markers.REM.. f| 00001300 6f 72 20 73 6f 72 74 69 6e 67 0d 2e 54 41 49 4c |or sorting..TAIL| 00001310 0d 20 73 65 6c 65 63 74 20 74 65 78 74 0d 20 64 |. select text. d| 00001320 65 6c 65 74 65 20 74 65 78 74 0d 20 52 45 4d 2e |elete text. REM.| 00001330 2e 20 41 53 43 49 49 20 63 6f 64 65 20 22 21 22 |. ASCII code "!"| 00001340 20 70 72 65 63 65 64 65 73 20 61 6c 6c 0d 20 52 | precedes all. R| 00001350 45 4d 2e 2e 20 61 6e 64 20 41 53 43 49 49 20 63 |EM.. and ASCII c| 00001360 6f 64 65 20 22 7e 22 20 66 6f 6c 6c 6f 77 73 20 |ode "~" follows | 00001370 61 6c 6c 0d 20 52 45 4d 2e 2e 20 61 6c 70 68 61 |all. REM.. alpha| 00001380 62 65 74 69 63 20 63 68 61 72 61 63 74 65 72 73 |betic characters| 00001390 0d 20 52 45 4d 2e 2e 20 62 75 69 6c 64 20 6d 61 |. REM.. build ma| 000013a0 72 6b 65 72 73 20 69 6e 74 6f 20 64 75 6d 6d 79 |rkers into dummy| 000013b0 20 72 65 63 6f 72 64 73 0d 20 20 59 24 3d 22 21 | records. Y$="!| 000013c0 22 0d 20 20 70 72 6f 63 44 55 4d 4d 49 45 53 0d |". procDUMMIES.| 000013d0 20 20 59 24 3d 22 7e 22 20 20 0d 20 20 70 72 6f | Y$="~" . pro| 000013e0 63 44 55 4d 4d 49 45 53 0d 65 6e 64 70 72 6f 63 |cDUMMIES.endproc| 000013f0 0d 0d 52 45 4d 2e 2e 20 69 6e 73 65 72 74 20 64 |..REM.. insert d| 00001400 75 6d 6d 79 20 72 65 63 6f 72 64 73 0d 2e 44 55 |ummy records..DU| 00001410 4d 4d 49 45 53 0d 20 64 6f 74 68 69 73 0d 20 20 |MMIES. dothis. | 00001420 74 79 70 65 20 22 3e 22 0d 20 20 64 6f 74 68 69 |type ">". dothi| 00001430 73 0d 20 20 20 74 79 70 65 20 59 24 2b 52 24 0d |s. type Y$+R$.| 00001440 20 20 74 69 6d 65 73 20 39 0d 20 74 69 6d 65 73 | times 9. times| 00001450 20 33 0d 65 6e 64 70 72 6f 63 0d 0d 52 45 4d 2e | 3.endproc..REM.| 00001460 2e 20 72 65 61 64 20 66 69 72 73 74 20 66 6f 75 |. read first fou| 00001470 72 20 6c 69 6e 65 73 20 6f 66 20 72 65 63 6f 72 |r lines of recor| 00001480 64 0d 52 45 4d 2e 2e 20 66 72 6f 6d 20 64 69 73 |d.REM.. from dis| 00001490 63 20 66 69 6c 65 73 0d 2e 52 45 41 44 0d 20 41 |c files..READ. A| 000014a0 24 3d 67 6c 66 24 46 25 0d 20 52 45 4d 2e 2e 20 |$=glf$F%. REM.. | 000014b0 63 68 65 63 6b 20 66 6f 72 20 66 69 6c 65 20 65 |check for file e| 000014c0 6e 64 0d 20 20 69 66 20 41 24 3d 5a 24 20 74 68 |nd. if A$=Z$ th| 000014d0 65 6e 20 67 6f 74 6f 20 45 4e 44 0d 20 42 24 3d |en goto END. B$=| 000014e0 67 6c 66 24 46 25 0d 20 43 24 3d 67 6c 66 24 46 |glf$F%. C$=glf$F| 000014f0 25 0d 20 44 24 3d 67 6c 66 24 46 25 0d 20 52 45 |%. D$=glf$F%. RE| 00001500 4d 2e 2e 20 53 24 20 69 73 20 73 65 61 72 63 68 |M.. S$ is search| 00001510 20 73 74 72 69 6e 67 20 28 22 63 6f 64 65 22 29 | string ("code")| 00001520 0d 20 52 45 4d 2e 2e 20 53 24 3d 66 69 65 6c 64 |. REM.. S$=field| 00001530 20 31 20 2b 20 66 69 65 6c 64 20 32 0d 20 20 53 | 1 + field 2. S| 00001540 24 3d 41 24 2b 42 24 0d 20 52 45 4d 2e 2e 20 69 |$=A$+B$. REM.. i| 00001550 6e 63 72 65 6d 65 6e 74 20 72 65 63 6f 72 64 20 |ncrement record | 00001560 63 6f 75 6e 74 20 43 25 0d 20 20 43 25 3d 43 25 |count C%. C%=C%| 00001570 2b 31 0d 20 52 45 4d 2e 2e 20 73 65 74 20 73 63 |+1. REM.. set sc| 00001580 6f 70 65 20 6f 66 20 73 65 61 72 63 68 20 44 25 |ope of search D%| 00001590 0d 20 20 44 25 3d 43 25 0d 65 6e 64 70 72 6f 63 |. D%=C%.endproc| 000015a0 0d 0d 2e 4c 4f 43 41 54 45 0d 20 52 45 4d 2e 2e |...LOCATE. REM..| 000015b0 20 6d 6f 76 65 20 74 6f 20 74 68 69 72 64 20 64 | move to third d| 000015c0 75 6d 6d 79 0d 20 20 63 75 72 73 6f 72 20 74 6f |ummy. cursor to| 000015d0 70 0d 20 20 63 75 72 73 6f 72 20 64 6f 77 6e 20 |p. cursor down | 000015e0 31 38 0d 2e 53 45 45 4b 0d 20 52 45 4d 2e 2e 20 |18..SEEK. REM.. | 000015f0 63 6f 6d 70 61 72 65 20 53 24 20 77 69 74 68 20 |compare S$ with | 00001600 63 6f 64 65 20 69 6e 20 72 65 63 6f 72 64 0d 20 |code in record. | 00001610 20 20 69 66 20 53 24 3c 67 6c 74 24 2b 67 6c 74 | if S$<glt$+glt| 00001620 24 20 74 68 65 6e 20 67 6f 74 6f 20 55 50 0d 20 |$ then goto UP. | 00001630 52 45 4d 2e 2e 20 6a 75 6d 70 20 74 6f 20 6e 65 |REM.. jump to ne| 00001640 78 74 20 72 65 63 6f 72 64 0d 20 20 63 75 72 73 |xt record. curs| 00001650 6f 72 20 64 6f 77 6e 20 37 0d 20 52 45 4d 2e 2e |or down 7. REM..| 00001660 20 63 6f 6d 70 61 72 65 20 53 24 20 77 69 74 68 | compare S$ with| 00001670 20 63 6f 64 65 20 69 6e 20 72 65 63 6f 72 64 0d | code in record.| 00001680 20 20 20 69 66 53 24 3e 67 6c 74 24 2b 67 6c 74 | ifS$>glt$+glt| 00001690 24 20 74 68 65 6e 20 67 6f 74 6f 20 44 4f 57 4e |$ then goto DOWN| 000016a0 0d 20 63 75 72 73 6f 72 20 75 70 20 32 0d 20 70 |. cursor up 2. p| 000016b0 72 6f 63 49 4e 53 45 52 54 0d 20 64 69 73 70 6c |rocINSERT. displ| 000016c0 61 79 0d 65 6e 64 70 72 6f 63 0d 0d 52 45 4d 2e |ay.endproc..REM.| 000016d0 2e 20 53 24 20 77 61 73 20 22 6c 65 73 73 20 74 |. S$ was "less t| 000016e0 68 61 6e 22 20 63 6f 64 65 20 66 6f 75 6e 64 0d |han" code found.| 000016f0 52 45 4d 2e 2e 20 20 73 6f 20 6d 6f 76 65 20 62 |REM.. so move b| 00001700 61 63 6b 20 69 6e 20 72 65 63 6f 72 64 73 0d 52 |ack in records.R| 00001710 45 4d 2e 2e 20 20 74 6f 20 6c 6f 6f 6b 20 61 67 |EM.. to look ag| 00001720 61 69 6e 0d 2e 55 50 0d 20 52 45 4d 20 61 74 20 |ain..UP. REM at | 00001730 65 61 63 68 20 73 65 61 72 63 68 20 73 63 6f 70 |each search scop| 00001740 65 20 44 25 20 69 73 20 68 61 6c 76 65 64 0d 20 |e D% is halved. | 00001750 20 69 66 20 44 25 3e 31 20 74 68 65 6e 20 44 25 | if D%>1 then D%| 00001760 3d 44 25 2f 32 0d 20 63 75 72 73 6f 72 20 75 70 |=D%/2. cursor up| 00001770 28 44 25 2a 39 29 2b 32 0d 67 6f 74 6f 20 53 45 |(D%*9)+2.goto SE| 00001780 45 4b 0d 0d 52 45 4d 2e 2e 20 53 24 20 77 61 73 |EK..REM.. S$ was| 00001790 20 22 67 72 65 61 74 65 72 20 74 68 61 6e 22 20 | "greater than" | 000017a0 63 6f 64 65 20 66 6f 75 6e 64 0d 52 45 4d 2e 2e |code found.REM..| 000017b0 20 20 73 6f 20 6d 6f 76 65 20 66 6f 72 77 61 72 | so move forwar| 000017c0 64 20 69 6e 20 72 65 63 6f 72 64 73 0d 52 45 4d |d in records.REM| 000017d0 2e 2e 20 20 74 6f 20 6c 6f 6f 6b 20 61 67 61 69 |.. to look agai| 000017e0 6e 0d 2e 44 4f 57 4e 0d 20 52 45 4d 20 61 74 20 |n..DOWN. REM at | 000017f0 65 61 63 68 20 73 65 61 72 63 68 20 73 63 6f 70 |each search scop| 00001800 65 20 44 25 20 69 73 20 68 61 6c 76 65 64 0d 20 |e D% is halved. | 00001810 20 69 66 20 44 25 3e 31 20 74 68 65 6e 20 44 25 | if D%>1 then D%| 00001820 3d 44 25 2f 32 0d 20 63 75 72 73 6f 72 20 64 6f |=D%/2. cursor do| 00001830 77 6e 28 44 25 2a 39 29 2d 32 0d 67 6f 74 6f 20 |wn(D%*9)-2.goto | 00001840 53 45 45 4b 0d 0d 52 45 4d 2e 2e 20 61 64 64 20 |SEEK..REM.. add | 00001850 72 65 63 6f 72 64 20 74 6f 20 63 6f 72 72 65 63 |record to correc| 00001860 74 20 70 6c 61 63 65 0d 2e 49 4e 53 45 52 54 0d |t place..INSERT.| 00001870 52 45 4d 2e 2e 20 65 6e 74 65 72 20 6c 69 6e 65 |REM.. enter line| 00001880 73 20 61 6c 72 65 61 64 79 20 72 65 61 64 0d 20 |s already read. | 00001890 74 79 70 65 20 41 24 2b 52 24 0d 20 74 79 70 65 |type A$+R$. type| 000018a0 20 42 24 2b 52 24 0d 20 74 79 70 65 20 43 24 2b | B$+R$. type C$+| 000018b0 52 24 0d 20 74 79 70 65 20 44 24 2b 52 24 0d 52 |R$. type D$+R$.R| 000018c0 45 4d 2e 2e 20 52 65 61 64 20 72 65 73 74 20 6f |EM.. Read rest o| 000018d0 66 20 72 65 63 6f 72 64 20 66 72 6f 6d 20 64 69 |f record from di| 000018e0 73 63 0d 52 45 4d 2e 2e 20 20 61 6e 64 20 65 6e |sc.REM.. and en| 000018f0 74 65 72 20 6c 69 6e 65 73 20 61 73 20 72 65 61 |ter lines as rea| 00001900 64 0d 20 64 6f 74 68 69 73 0d 20 20 74 79 70 65 |d. dothis. type| 00001910 20 67 6c 66 24 46 25 2b 52 24 0d 20 74 69 6d 65 | glf$F%+R$. time| 00001920 73 20 35 0d 65 6e 64 70 72 6f 63 20 0d 0d 2e 45 |s 5.endproc ...E| 00001930 4e 44 0d 63 6c 6f 73 65 23 30 0d 52 45 4d 2e 2e |ND.close#0.REM..| 00001940 20 63 6c 6f 73 65 20 66 69 6c 65 0d 70 72 6f 63 | close file.proc| 00001950 54 49 44 59 0d 70 72 6f 63 54 49 4d 45 0d 64 69 |TIDY.procTIME.di| 00001960 73 70 6c 61 79 0d 45 4e 44 0d 0d 2e 54 49 44 59 |splay.END...TIDY| 00001970 0d 52 45 4d 2e 2e 20 53 65 74 20 6d 61 72 6b 65 |.REM.. Set marke| 00001980 72 73 20 61 72 6f 75 6e 64 20 64 75 6d 6d 79 20 |rs around dummy | 00001990 72 65 63 6f 72 64 73 0d 52 45 4d 2e 2e 20 20 61 |records.REM.. a| 000019a0 74 20 73 74 61 72 74 20 6f 66 20 66 69 6c 65 0d |t start of file.| 000019b0 20 63 75 72 73 6f 72 20 74 6f 70 0d 20 66 6b 65 | cursor top. fke| 000019c0 79 20 33 0d 20 63 75 72 73 6f 72 20 61 74 20 30 |y 3. cursor at 0| 000019d0 0d 20 63 75 72 73 6f 72 20 64 6f 77 6e 20 32 37 |. cursor down 27| 000019e0 0d 20 66 6b 65 79 20 33 0d 52 45 4d 2e 2e 20 20 |. fkey 3.REM.. | 000019f0 61 6e 64 20 64 65 6c 65 74 65 20 74 68 65 6d 0d |and delete them.| 00001a00 20 66 6b 65 79 20 37 0d 52 45 4d 2e 2e 20 53 65 | fkey 7.REM.. Se| 00001a10 74 20 6d 61 72 6b 65 72 73 20 61 72 6f 75 6e 64 |t markers around| 00001a20 20 64 75 6d 6d 79 20 72 65 63 6f 72 64 73 0d 52 | dummy records.R| 00001a30 45 4d 2e 2e 20 20 61 74 20 65 6e 64 20 6f 66 20 |EM.. at end of | 00001a40 66 69 6c 65 0d 20 63 75 72 73 6f 72 20 62 6f 74 |file. cursor bot| 00001a50 74 6f 6d 0d 20 66 6b 65 79 20 33 0d 20 63 75 72 |tom. fkey 3. cur| 00001a60 73 6f 72 20 75 70 20 32 37 0d 20 63 75 72 73 6f |sor up 27. curso| 00001a70 72 20 61 74 20 30 0d 20 66 6b 65 79 20 33 0d 52 |r at 0. fkey 3.R| 00001a80 45 4d 2e 2e 20 20 61 6e 64 20 64 65 6c 65 74 65 |EM.. and delete| 00001a90 0d 20 66 6b 65 79 20 37 0d 52 45 4d 2e 2e 20 61 |. fkey 7.REM.. a| 00001aa0 64 64 20 65 6e 64 6d 61 72 6b 65 72 20 74 6f 20 |dd endmarker to | 00001ab0 66 69 6c 65 0d 20 74 79 70 65 20 5a 24 2b 52 24 |file. type Z$+R$| 00001ac0 2b 52 24 0d 52 45 4d 2e 2e 20 72 65 74 72 69 65 |+R$.REM.. retrie| 00001ad0 76 65 20 68 65 61 64 69 6e 67 20 66 72 6f 6d 20 |ve heading from | 00001ae0 73 65 67 6d 65 6e 74 20 30 0d 20 63 75 72 73 6f |segment 0. curso| 00001af0 72 20 74 6f 70 0d 20 74 79 70 65 20 73 65 67 6d |r top. type segm| 00001b00 65 6e 74 20 30 0d 20 73 65 6c 65 63 74 20 73 65 |ent 0. select se| 00001b10 67 6d 65 6e 74 20 30 0d 20 64 65 6c 65 74 65 20 |gment 0. delete | 00001b20 74 65 78 74 0d 20 73 65 6c 65 63 74 20 74 65 78 |text. select tex| 00001b30 74 0d 65 6e 64 70 72 6f 63 0d 0d 2e 54 49 4d 45 |t.endproc...TIME| 00001b40 0d 20 54 25 3d 54 49 4d 45 0d 20 63 6c 73 0d 20 |. T%=TIME. cls. | 00001b50 76 64 75 31 30 2c 31 30 2c 31 30 0d 20 70 72 69 |vdu10,10,10. pri| 00001b60 6e 74 22 54 49 4d 45 20 74 6f 20 53 4f 52 54 20 |nt"TIME to SORT | 00001b70 22 3b 0d 20 70 72 69 6e 74 20 73 74 72 24 43 25 |";. print str$C%| 00001b80 2b 22 20 52 45 43 4f 52 44 53 22 0d 20 70 72 69 |+" RECORDS". pri| 00001b90 6e 74 20 22 77 61 73 20 22 2b 73 74 72 24 28 54 |nt "was "+str$(T| 00001ba0 25 44 49 56 31 30 30 29 2b 22 2e 22 3b 0d 20 70 |%DIV100)+".";. p| 00001bb0 72 69 6e 74 20 73 74 72 24 28 54 25 4d 4f 44 31 |rint str$(T%MOD1| 00001bc0 30 30 29 2b 22 20 73 65 63 6f 6e 64 73 22 0d 20 |00)+" seconds". | 00001bd0 47 25 3d 67 65 74 0d 65 6e 64 70 72 6f 63 0d 3d |G%=get.endproc.=| 00001be0 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |================| 00001bf0 3d 3d 3d 0d 52 45 4d 2e 2e 20 44 2e 43 4f 55 4e |===.REM.. D.COUN| 00001c00 54 0d 52 45 4d 2e 2e 20 42 59 20 43 20 4a 20 57 |T.REM.. BY C J W| 00001c10 61 6c 64 6f 63 6b 0d 52 45 4d 2e 2e 20 28 43 29 |aldock.REM.. (C)| 00001c20 20 54 68 65 20 4d 69 63 72 6f 20 55 73 65 72 0d | The Micro User.| 00001c30 52 45 4d 2e 2e 20 53 69 6d 70 6c 65 20 63 6f 75 |REM.. Simple cou| 00001c40 6e 74 20 6f 66 20 72 65 63 6f 72 64 73 0d 0d 52 |nt of records..R| 00001c50 45 4d 2e 2e 20 66 69 72 73 74 20 63 6c 65 61 72 |EM.. first clear| 00001c60 20 62 6f 74 74 6f 6d 20 6f 66 20 74 65 78 74 0d | bottom of text.| 00001c70 20 73 65 6c 65 63 74 20 74 65 78 74 0d 20 63 75 | select text. cu| 00001c80 72 73 6f 72 20 74 6f 70 0d 20 66 69 6e 64 20 22 |rsor top. find "| 00001c90 3e 45 4e 44 22 0d 20 63 75 72 73 6f 72 20 64 6f |>END". cursor do| 00001ca0 77 6e 0d 20 66 6b 65 79 20 33 0d 20 63 75 72 73 |wn. fkey 3. curs| 00001cb0 6f 72 20 62 6f 74 74 6f 6d 0d 20 66 6b 65 79 20 |or bottom. fkey | 00001cc0 33 0d 20 66 6b 65 79 20 37 0d 0d 52 45 4d 2e 2e |3. fkey 7..REM..| 00001cd0 20 69 6e 69 74 69 61 6c 69 7a 65 20 72 65 63 6f | initialize reco| 00001ce0 72 64 20 63 6f 75 6e 74 65 72 20 43 25 0d 20 43 |rd counter C%. C| 00001cf0 25 3d 30 0d 0d 52 45 4d 2e 2e 20 63 6f 75 6e 74 |%=0..REM.. count| 00001d00 20 6f 70 65 72 61 74 69 6f 6e 0d 20 63 75 72 73 | operation. curs| 00001d10 6f 72 20 74 6f 70 0d 20 72 65 70 65 61 74 0d 20 |or top. repeat. | 00001d20 20 66 69 6e 64 20 22 3e 22 0d 20 20 63 75 72 73 | find ">". curs| 00001d30 6f 72 20 72 69 67 68 74 0d 20 20 43 25 3d 43 25 |or right. C%=C%| 00001d40 2b 31 0d 20 75 6e 74 69 6c 20 45 4f 54 0d 0d 52 |+1. until EOT..R| 00001d50 45 4d 2e 2e 20 41 64 6a 75 73 74 20 43 25 20 66 |EM.. Adjust C% f| 00001d60 6f 72 20 22 3e 45 4e 44 22 0d 52 45 4d 2e 2e 20 |or ">END".REM.. | 00001d70 20 61 6e 64 20 73 75 62 73 65 71 75 65 6e 74 20 | and subsequent | 00001d80 73 65 65 6b 0d 20 43 25 3d 43 25 2d 32 0d 0d 52 |seek. C%=C%-2..R| 00001d90 45 4d 2e 2e 20 61 64 76 69 73 65 20 72 65 73 75 |EM.. advise resu| 00001da0 6c 74 0d 20 63 75 72 73 6f 72 20 62 6f 74 74 6f |lt. cursor botto| 00001db0 6d 0d 20 74 79 70 65 20 53 54 52 24 28 43 25 29 |m. type STR$(C%)| 00001dc0 2b 22 20 4d 45 4d 42 45 52 53 22 0d 64 69 73 70 |+" MEMBERS".disp| 00001dd0 6c 61 79 0d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d |lay.============| 00001de0 3d 3d 3d 3d 3d 3d 3d 3d 0d 52 45 4d 2e 2e 20 44 |========.REM.. D| 00001df0 2e 47 4c 4f 42 44 45 4c 0d 52 45 4d 2e 2e 20 42 |.GLOBDEL.REM.. B| 00001e00 59 20 43 20 4a 20 57 61 6c 64 6f 63 6b 0d 52 45 |Y C J Waldock.RE| 00001e10 4d 2e 2e 20 28 43 29 20 54 68 65 20 4d 69 63 72 |M.. (C) The Micr| 00001e20 6f 20 55 73 65 72 0d 52 45 4d 2e 2e 20 47 6c 6f |o User.REM.. Glo| 00001e30 62 61 6c 20 64 65 6c 65 74 65 20 6f 66 20 61 6c |bal delete of al| 00001e40 6c 20 72 65 63 6f 72 64 73 0d 52 45 4d 2e 2e 20 |l records.REM.. | 00001e50 20 69 6e 20 74 65 78 74 2c 20 77 69 74 68 20 73 | in text, with s| 00001e60 65 6c 65 63 74 65 64 20 63 6f 64 65 0d 0d 52 45 |elected code..RE| 00001e70 4d 2e 2e 20 73 65 74 20 63 6f 6e 73 74 61 6e 74 |M.. set constant| 00001e80 2c 20 63 61 72 72 69 61 67 65 20 72 65 74 75 72 |, carriage retur| 00001e90 6e 0d 20 52 24 3d 63 68 72 24 31 33 0d 52 45 4d |n. R$=chr$13.REM| 00001ea0 2e 2e 20 72 65 73 65 74 20 72 65 63 6f 72 64 20 |.. reset record | 00001eb0 63 6f 75 6e 74 65 72 0d 20 43 25 3d 30 0d 0d 20 |counter. C%=0.. | 00001ec0 73 65 6c 65 63 74 20 74 65 78 74 0d 20 63 75 72 |select text. cur| 00001ed0 73 6f 72 20 74 6f 70 0d 0d 20 52 45 4d 2e 2e 20 |sor top.. REM.. | 00001ee0 47 65 74 20 66 69 6c 65 20 72 65 71 75 69 72 65 |Get file require| 00001ef0 64 0d 20 52 45 4d 2e 2e 20 20 61 6e 64 20 63 6f |d. REM.. and co| 00001f00 64 65 20 66 6f 72 20 72 65 63 6f 72 64 73 20 74 |de for records t| 00001f10 6f 20 64 65 6c 65 74 65 0d 63 6c 73 0d 20 70 72 |o delete.cls. pr| 00001f20 69 6e 74 0d 20 70 72 69 6e 74 0d 20 70 72 69 6e |int. print. prin| 00001f30 74 0d 20 70 72 69 6e 74 22 44 45 4c 45 54 45 53 |t. print"DELETES| 00001f40 20 41 4c 4c 20 53 45 4c 45 43 54 45 44 20 52 45 | ALL SELECTED RE| 00001f50 43 4f 52 44 53 22 0d 20 70 72 69 6e 74 0d 20 70 |CORDS". print. p| 00001f60 72 69 6e 74 22 20 2d 20 41 52 45 20 59 4f 55 20 |rint" - ARE YOU | 00001f70 53 55 52 45 3a 20 59 2f 4e 3f 20 22 3b 0d 20 70 |SURE: Y/N? ";. p| 00001f80 72 6f 63 4f 50 54 4f 55 54 0d 63 6c 73 0d 20 70 |rocOPTOUT.cls. p| 00001f90 72 69 6e 74 0d 20 70 72 69 6e 74 0d 20 70 72 69 |rint. print. pri| 00001fa0 6e 74 0d 20 70 72 69 6e 74 22 45 4e 54 45 52 20 |nt. print"ENTER | 00001fb0 43 4f 44 45 28 53 29 20 66 6f 72 20 72 65 63 6f |CODE(S) for reco| 00001fc0 72 64 73 20 74 6f 20 62 65 20 44 45 4c 45 54 45 |rds to be DELETE| 00001fd0 44 22 0d 20 70 72 69 6e 74 0d 20 70 72 69 6e 74 |D". print. print| 00001fe0 22 57 49 4c 44 43 41 52 44 20 22 22 23 22 22 20 |"WILDCARD ""#"" | 00001ff0 6d 61 79 20 62 65 20 75 73 65 64 22 0d 20 70 72 |may be used". pr| 00002000 69 6e 74 0d 20 70 72 69 6e 74 22 3d 3d 3e 20 22 |int. print"==> "| 00002010 3b 0d 20 53 24 3d 67 6c 6b 24 0d 20 69 66 20 61 |;. S$=glk$. if a| 00002020 73 63 53 24 3c 3e 36 32 20 74 68 65 6e 20 70 72 |scS$<>62 then pr| 00002030 6f 63 41 44 44 0d 20 70 72 69 6e 74 0d 20 70 72 |ocADD. print. pr| 00002040 69 6e 74 22 4f 4b 20 2d 20 59 2f 4e 3f 22 3b 0d |int"OK - Y/N?";.| 00002050 20 70 72 6f 63 4f 50 54 4f 55 54 0d 20 70 72 69 | procOPTOUT. pri| 00002060 6e 74 0d 20 70 72 69 6e 74 22 44 45 4c 45 54 49 |nt. print"DELETI| 00002070 4e 47 20 52 45 43 4f 52 44 53 20 61 73 20 72 65 |NG RECORDS as re| 00002080 71 75 65 73 74 65 64 22 0d 20 70 72 69 6e 74 0d |quested". print.| 00002090 20 70 72 69 6e 74 22 50 6c 65 61 73 65 20 77 61 | print"Please wa| 000020a0 69 74 20 61 20 77 68 69 6c 65 20 2e 20 2e 20 2e |it a while . . .| 000020b0 22 0d 0d 52 45 4d 2e 2e 20 64 65 6c 65 74 69 6f |"..REM.. deletio| 000020c0 6e 20 6f 66 20 72 65 63 6f 72 64 73 0d 20 72 65 |n of records. re| 000020d0 70 65 61 74 0d 20 20 66 69 6e 64 20 52 24 2b 53 |peat. find R$+S| 000020e0 24 0d 20 20 43 25 3d 43 25 2b 31 0d 20 20 52 45 |$. C%=C%+1. RE| 000020f0 4d 20 6d 61 72 6b 20 72 65 63 6f 72 64 0d 20 20 |M mark record. | 00002100 20 66 6b 65 79 33 0d 20 20 20 63 75 72 73 6f 72 | fkey3. cursor| 00002110 20 64 6f 77 6e 20 39 0d 20 20 20 66 6b 65 79 20 | down 9. fkey | 00002120 33 0d 20 20 50 45 4d 20 64 65 6c 65 74 65 20 6d |3. PEM delete m| 00002130 61 72 6b 65 64 20 72 65 63 6f 72 64 0d 20 20 20 |arked record. | 00002140 66 6b 65 79 20 37 0d 20 75 6e 74 69 6c 20 45 4f |fkey 7. until EO| 00002150 54 0d 52 45 4d 2e 2e 20 61 64 6a 75 73 74 20 63 |T.REM.. adjust c| 00002160 6f 75 6e 74 20 66 6f 72 20 66 69 6e 61 6c 20 73 |ount for final s| 00002170 65 61 72 63 68 0d 20 43 25 3d 43 25 2d 31 0d 0d |earch. C%=C%-1..| 00002180 2e 45 4e 44 0d 20 74 79 70 65 20 52 24 2b 73 74 |.END. type R$+st| 00002190 72 24 43 25 2b 22 20 52 45 43 4f 52 44 53 20 43 |r$C%+" RECORDS C| 000021a0 4f 44 45 44 3a 20 22 0d 20 74 79 70 65 20 53 24 |ODED: ". type S$| 000021b0 2b 20 22 20 44 45 4c 45 54 45 44 22 0d 20 64 69 |+ " DELETED". di| 000021c0 73 70 6c 61 79 0d 45 4e 44 0d 0d 2e 4f 50 54 4f |splay.END...OPTO| 000021d0 55 54 0d 20 70 72 69 6e 74 22 20 20 3d 3d 3e 20 |UT. print" ==> | 000021e0 22 3b 0d 20 5a 24 3d 67 63 6b 24 0d 20 70 72 69 |";. Z$=gck$. pri| 000021f0 6e 74 5a 24 0d 20 20 69 66 5a 24 3d 22 79 22 20 |ntZ$. ifZ$="y" | 00002200 74 68 65 6e 20 5a 24 3d 22 59 22 0d 20 20 69 66 |then Z$="Y". if| 00002210 5a 24 3c 3e 22 59 22 74 68 65 6e 20 67 6f 74 6f |Z$<>"Y"then goto| 00002220 20 45 4e 44 0d 65 6e 64 70 72 6f 63 0d 0d 2e 41 | END.endproc...A| 00002230 44 44 0d 20 53 24 3d 22 3e 22 2b 53 24 0d 20 70 |DD. S$=">"+S$. p| 00002240 72 69 6e 74 0d 20 70 72 69 6e 74 22 63 6f 72 72 |rint. print"corr| 00002250 65 63 74 65 64 20 74 6f 3a 20 22 2b 53 24 0d 65 |ected to: "+S$.e| 00002260 6e 64 70 72 6f 63 0d 3d 3d 3d 3d 3d 3d 3d 3d 3d |ndproc.=========| 00002270 3d 3d 3d 3d 3d 3d 3d 3d 3d 3d 0d |==========.| 0000227b