Home » Personal collection » Acorn tapes » Electron_User » Electron_User_tape20a_acorn_eu_1991_march.wav » WorkOut

WorkOut

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_tape20a_acorn_eu_1991_march.wav
Filename: WorkOut
Read OK:
File size: 1383 bytes
Load address: FFFF1900
Exec address: FFFF8023
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10REM Worksheet Workout
   20REM by Gordon Lethbridge
   30REM (c) The Micro User
   40MODE7
   50PROCinit
   60ON ERROR PROCerror
   70REPEAT
   80O%=FNmenu
   90IF O%<opts% PROChead(opt$(O%,1))
  100quit=EVAL("FN"+opt$(O%,2))
  110UNTIL quit
  120PROCquit
  130END
  140DEF PROCinit:PROCoff:*FX4,1
  150maxwords=100:numwords=0
  160DIM word$(maxwords+1)
  170maxrepls=5:numrepls=0
  180DIM repl$(maxrepls+1)
  190READ opts%:DIM opt$(opts%,2)
  200FOR O%=1 TO opts%
  210READ opt$(O%,1),opt$(O%,2)
  220opts$=opts$+STR$O%:NEXT
  230READ types:DIM type$(types)
  240FOR T%=1 TO types
  250READ type$(T%):NEXT:type=1
  260of$="":F%=0
  270DIM f%256:osfind=&FFCE
  280E%=0:osbyte=&FFF4:oscli=&FFF7
  290lo$="abcdefghijklmnopqrstuvwxyz"
  300hi$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  310alf$=lo$+hi$:num$="0123456789"
  320punc$="!#$%&()=-^|@:."
  330vowel$="aeiou"
  340all$=alf$+num$+punc$
  350dl$=CHR$127:cr$=CHR$13
  360copies=1:lines=24
  370PROCwindow(0):ENDPROC
  380DATA 4
  390DATA Load words,load
  400DATA Set options,options
  410DATA Print worksheet,print
  420DATA Quit,quit
  430DATA 3
  440DATA Replace,Magic E,Plurals
  450DEF PROCoff
  460VDU23,1,0;0;0;0;0;:ENDPROC
  470DEF PROCon
  480VDU23,1,1;0;0;0;0;:ENDPROC
  490DEF PROCerror:*FX3,4
  500PROCoff:F%=FNclose(F%)
  510IF ERR=17 AND E%>0 E%=0:PROCmessage(e$):Z%=FNin(" ")
  520IF ERR=17 AND E%=0 ENDPROC
  530ON ERROR OFF:PROCquit
  540REPORT:PRINT" at ";ERL
  550END
  560DEF PROCmessage(m$):VDU7
  570PROCwindow(2):PROCcn(m$,1):ENDPROC
  580DEF PROCos($f%):LOCAL X%,Y%
  590X%=f%:Y%=X%DIV256:CALLoscli
  600ENDPROC
  610DEF PROCwindow(W%)
  620IF W%=0 lx%=0:by%=24:rx%=39:ty%=0
  630IF W%=1 lx%=3:by%=21:rx%=36:ty%=2
  640IF W%=2 lx%=3:by%=24:rx%=36:ty%=22
  650VDU28lx%by%rx%ty%12:ENDPROC
  660DEF FNclose(F%)
  670IF F%<>0 CLOSE#F%:F%=0
  680=F%
  690DEF FNopenin($f%)
  700LOCAL A%,X%,Y%:X%=f%
  710Y%=X%DIV256:A%=&40
  720=USR(osfind)AND&FF
  730DEF FNfilename(t$,Y%)
  740PRINTTAB(10,Y%)t$" : "
  750of$=FNstring(of$,8,Y%+2,20)
  760=of$
  770DEF FNnum(t$,N%,Y%)
  780PRINTTAB(8,Y%)t$" : ";
  790=VALFNstring(STR$N%,POS,VPOS,4)
  800DEF FNstring(s$,X%,Y%,L%)
  810LOCAL I%,P%,a$:P%=LENs$
  820VDU31X%+L%+2Y%,156
  830VDU31X%-3Y%,132,157,131
  840PRINTSPCL%TAB(X%,Y%)s$;
  850REPEAT a$=all$
  860IF P%>0 a$=a$+dl$+cr$
  870IF P%=L% a$=dl$+cr$
  880i$=MID$(a$,FNin(a$),1)
  890IF i$=dl$ VDU127:P%=P%-1:s$=LEFT$(s$,P%) ELSEIF i$<>cr$ PRINTi$;:s$=s$+i$:P%=P%+1
  900UNTIL i$=cr$:=s$
  910DEF PROCgenError(e$):E%=99
  920A%=125:CALLosbyte:ENDPROC
  930DEF PROCquit:*FX4
  940PROCon:VDU26,12:ENDPROC
  950DEF FNmenu:LOCAL O%
  960PROChead("Worksheet Workout")
  970FOR O%=1 TO opts%
  980PROCout(O%,6,O%*2+1):NEXT
  990PRINT'SPC10"Enter choice";
 1000=FNin(opts$)
 1010DEF PROChead(t$)
 1020PROCwindow(0)
 1030LOCAL L%:FOR L%=0 TO 1
 1040VDU31,0,L%,132,157,131
 1050NEXT:PROCdb(t$,0)
 1060FOR L%=22 TO 24
 1070VDU31,0,L%,132,157,131
 1080NEXT:PROCwindow(1):ENDPROC
 1090DEF PROCdb(t$,Y%)
 1100PROCcn(CHR$141+t$+" ",Y%)
 1110PROCcn(CHR$141+t$+" ",Y%+1)
 1120ENDPROC
 1130DEF PROCcn(t$,Y%)
 1140PRINTTAB((rx%-lx%-LENt$)/2,Y%)t$;
 1150ENDPROC
 1160DEF PROCout(O%,X%,Y%)
 1170LOCAL t$:t$=CHR$129+STR$O%+"."
 1180t$=t$+CHR$134+opt$(O%,1)
 1190PRINTTAB(X%,Y%)t$:ENDPROC
 1200DEF FNin(k$)
 1210LOCAL I%:REPEAT PROCon
 1220I%=INSTR(k$,GET$):PROCoff
 1230VDU-7*(I%=0):UNTIL I%>0
 1240shift%=INKEY-1:=I%
 1250DEF PROCsure:VDU7
 1260PROCmessage("Are you sure? (y/n)")
 1270IF FNin("YyNn")>2 PROCgenError("Aborted")
 1280PROCwindow(2):ENDPROC
 1290DEF FNload:LOCAL L%,f$
 1300f$=FNfilename("Load",3)
 1310F%=FNopenin(f$)
 1320IF F%=0 PROCgenError("Can't open input file")
 1330INPUT#F%,type,numrepls,numwords
 1340IF type>types PROCgenError("Unknown file type")
 1350IF numwords>maxwords PROCgenError("Too many words")
 1360IF numwords<2 PROCgenError("Not enough words")
 1370IF numrepls>maxrepls PROCgenError("Too many replacements")
 1380IF type=1 AND numrepls=0 PROCgenError("No replacements")
 1390FOR L%=1 TO numrepls
 1400INPUT#F%,repl$(L%):NEXT
 1410FOR L%=1 TO numwords
 1420INPUT#F%,word$(L%):NEXT
 1430F%=FNclose(F%):=0
 1440DEF FNoptions
 1450copies=FNnum("Number of copies",copies,2)
 1460lines=FNnum("Number of lines",lines,4)
 1470=0
 1480DEF FNprint
 1490PROCmessage("Ready printer...")
 1500Z%=FNin(" "):Q%=TIME
 1510FOR C%=1 TO copies
 1520Z%=RND(-Q%):last%=-1
 1530PROCmessage("Copy "+STR$C%+" of "+STR$copies):*FX3,10
 1540PROCheader(C%)
 1550FOR L%=1 TO lines
 1560PROCline:NEXT:VDU12:*FX3,4
 1570NEXT:=0
 1580DEF PROCheader(C%):LOCALt1$,t2$,t3$
 1590IF type=1 t1$="There are letters missing from":t2$="each of these words. Can you work out":t3$="which ones they are?"
 1600IF type=2 t1$="There is one letter missing from each of":t2$="these MAGIC E words. Can you work out":t3$="which letter it is?"
 1610IF type=3 t1$="Change these singular nouns to":t2$="their plural form. You will have":t3$="to make some changes."
 1620PRINT"Number ";C%" "type$(type)TAB(60)"Number ";C%
 1630PRINTt1$'t2$'t3$
 1640PRINT"You can have the same word more"'"than once on the sheet. When you"'"have finished check your answers."
 1650PRINT'"NO PEEPING until you have finished."
 1660PRINT:ENDPROC
 1670DEF PROCline:VDU14
 1680REPEAT W%=RND(numwords)
 1690UNTIL W%<>last%:last%=W%
 1700w$=word$(W%)
 1710IF type=1 PROCreplace
 1720IF type=2 PROCmagic_e
 1730IF type=3 PROCplurals
 1740VDU20:ENDPROC
 1750DEF PROCreplace
 1760REPEAT
 1770IF numrepls=1 K%=1 ELSEK%=RND(numrepls)
 1780found=TRUE:p$=repl$(K%)
 1790q$=FNdoReplace(w$,p$)
 1800UNTIL found
 1810PRINTTAB(5)q$TAB(25)p$TAB(31)w$'
 1820ENDPROC
 1830DEF FNdoReplace(w$,p$)
 1840LOCAL P%,a$,b$:P%=INSTR(w$,p$)
 1850IF P%=0 found=FALSE:=""
 1860a$=LEFT$(w$,P%-1)
 1870b$=MID$(w$,P%+LENp$)
 1880=a$+STRING$(LENp$,"_")+b$
 1890DEF PROCmagic_e:K%=LENw$
 1900REPEAT K%=K%-1
 1910UNTIL INSTR(vowel$,MID$(w$,K%,1))
 1920a$=LEFT$(w$,K%-1)
 1930b$=MID$(w$,K%+1)
 1940PRINTTAB(5)a$"_"b$TAB(31)w$'
 1950ENDPROC
 1960DEF PROCplurals:K%=LENw$
 1970b$=RIGHT$(w$,3):q$=""
 1980IF b$="xes" OR b$="ses" OR b$="hes" OR b$="oes" q$=FNplur1
 1990IF b$="ves" q$=FNplur2
 2000IF b$="ies" q$=FNplur3
 2010IF q$="" q$=FNplurX
 2020IF q$="" q$=FNplur4
 2030p$=STRING$(12,"_")
 2040PRINTTAB(2)q$TAB(12)p$TAB(28)w$'
 2050ENDPROC
 2060DEF FNplur1=LEFT$(w$,K%-2)
 2070DEF FNplur2=LEFT$(w$,K%-3)+"f"
 2080DEF FNplur3=LEFT$(w$,K%-3)+"y"
 2090DEF FNplur4=LEFT$(w$,K%-1)
 2100DEF FNplurX
 2110IF w$="sheep" =w$
 2120=""
 2130DEF FNquit=TRUE

� Worksheet Workout
� by Gordon Lethbridge
� (c) The Micro User
(�7
2	�init
<� � �error
F�
PO%=�menu
Z � O%<opts% �head(opt$(O%,1))
dquit=�("FN"+opt$(O%,2))
n
� quit
x	�quit
��
�� �init:�off:*FX4,1
�maxwords=100:numwords=0
�� word$(maxwords+1)
�maxrepls=5:numrepls=0
�� repl$(maxrepls+1)
�� opts%:� opt$(opts%,2)
�� O%=1 � opts%
�� opt$(O%,1),opt$(O%,2)
�opts$=opts$+�O%:�
�� types:� type$(types)
�� T%=1 � types
�� type$(T%):�:type=1
of$="":F%=0
� f%256:osfind=&FFCE
!E%=0:osbyte=&FFF4:oscli=&FFF7
"$lo$="abcdefghijklmnopqrstuvwxyz"
,$hi$="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
6"alf$=lo$+hi$:num$="0123456789"
@punc$="!#$%&()=-^|@:."
Jvowel$="aeiou"
Tall$=alf$+num$+punc$
^dl$=�127:cr$=�13
hcopies=1:lines=24
r�window(0):�
|� 4
�� Load words,load
�� Set options,options
�� Print worksheet,print
�� Quit,quit
�� 3
�� Replace,Magic E,Plurals
�
� �off
��23,1,0;0;0;0;0;:�
�	� �on
��23,1,1;0;0;0;0;:�
�� �error:*FX3,4
��off:F%=�close(F%)
�/� �=17 � E%>0 E%=0:�message(e$):Z%=�in(" ")
� �=17 � E%=0 �
� � �:�quit
�:�" at ";�
&�
0� �message(m$):�7
:�window(2):�cn(m$,1):�
D� �os($f%):� X%,Y%
NX%=f%:Y%=X%�256:�oscli
X�
b� �window(W%)
l$� W%=0 lx%=0:by%=24:rx%=39:ty%=0
v$� W%=1 lx%=3:by%=21:rx%=36:ty%=2
�%� W%=2 lx%=3:by%=24:rx%=36:ty%=22
��28lx%by%rx%ty%12:�
�� �close(F%)
�� F%<>0 �#F%:F%=0
�=F%
�� �openin($f%)
�� A%,X%,Y%:X%=f%
�Y%=X%�256:A%=&40
�=�(osfind)�&FF
�� �filename(t$,Y%)
��10,Y%)t$" : "
�of$=�string(of$,8,Y%+2,20)
�=of$
� �num(t$,N%,Y%)
�8,Y%)t$" : ";
=��string(�N%,�,�,4)
 � �string(s$,X%,Y%,L%)
*� I%,P%,a$:P%=�s$
4�31X%+L%+2Y%,156
>�31X%-3Y%,132,157,131
H�L%�X%,Y%)s$;
R
� a$=all$
\� P%>0 a$=a$+dl$+cr$
f� P%=L% a$=dl$+cr$
pi$=�a$,�in(a$),1)
zE� i$=dl$ �127:P%=P%-1:s$=�s$,P%) �� i$<>cr$ �i$;:s$=s$+i$:P%=P%+1
�� i$=cr$:=s$
�� �genError(e$):E%=99
�A%=125:�osbyte:�
�� �quit:*FX4
��on:�26,12:�
�� �menu:� O%
��head("Worksheet Workout")
�� O%=1 � opts%
��out(O%,6,O%*2+1):�
��'�10"Enter choice";
�=�in(opts$)
�� �head(t$)
��window(0)
� L%:� L%=0 � 1
�31,0,L%,132,157,131
�:�db(t$,0)
$� L%=22 � 24
.�31,0,L%,132,157,131
8�:�window(1):�
B� �db(t$,Y%)
L�cn(�141+t$+" ",Y%)
V�cn(�141+t$+" ",Y%+1)
`�
j� �cn(t$,Y%)
t�(rx%-lx%-�t$)/2,Y%)t$;
~�
�� �out(O%,X%,Y%)
�� t$:t$=�129+�O%+"."
�t$=t$+�134+opt$(O%,1)
��X%,Y%)t$:�
�
� �in(k$)
�� I%:� �on
�I%=�k$,�):�off
��-7*(I%=0):� I%>0
�shift%=�-1:=I%
�� �sure:�7
�#�message("Are you sure? (y/n)")
�(� �in("YyNn")>2 �genError("Aborted")
�window(2):�

� �load:� L%,f$
f$=�filename("Load",3)
F%=�openin(f$)
(-� F%=0 �genError("Can't open input file")
2�#F%,type,numrepls,numwords
</� type>types �genError("Unknown file type")
F3� numwords>maxwords �genError("Too many words")
P.� numwords<2 �genError("Not enough words")
Z:� numrepls>maxrepls �genError("Too many replacements")
d6� type=1 � numrepls=0 �genError("No replacements")
n� L%=1 � numrepls
x�#F%,repl$(L%):�
�� L%=1 � numwords
��#F%,word$(L%):�
�F%=�close(F%):=0
�� �options
�,copies=�num("Number of copies",copies,2)
�)lines=�num("Number of lines",lines,4)
�=0
�� �print
� �message("Ready printer...")
�Z%=�in(" "):Q%=�
�� C%=1 � copies
�Z%=�(-Q%):last%=-1
�0�message("Copy "+�C%+" of "+�copies):*FX3,10
�header(C%)
� L%=1 � lines
�line:�:�12:*FX3,4
"�:=0
,� �header(C%):�t1$,t2$,t3$
6x� type=1 t1$="There are letters missing from":t2$="each of these words. Can you work out":t3$="which ones they are?"
@�� type=2 t1$="There is one letter missing from each of":t2$="these MAGIC E words. Can you work out":t3$="which letter it is?"
Jt� type=3 t1$="Change these singular nouns to":t2$="their plural form. You will have":t3$="to make some changes."
T/�"Number ";C%" "type$(type)�60)"Number ";C%
^�t1$'t2$'t3$
hm�"You can have the same word more"'"than once on the sheet. When you"'"have finished check your answers."
r+�'"NO PEEPING until you have finished."
|�:�
�� �line:�14
�� W%=�(numwords)
�� W%<>last%:last%=W%
�w$=word$(W%)
�� type=1 �replace
�� type=2 �magic_e
�� type=3 �plurals
�	�20:�
�� �replace
��
�%� numrepls=1 K%=1 �K%=�(numrepls)
�found=�:p$=repl$(K%)
�q$=�doReplace(w$,p$)
� found
�5)q$�25)p$�31)w$'
�
&� �doReplace(w$,p$)
0� P%,a$,b$:P%=�w$,p$)
:� P%=0 found=�:=""
Da$=�w$,P%-1)
Nb$=�w$,P%+�p$)
X=a$+ĩp$,"_")+b$
b� �magic_e:K%=�w$
l
� K%=K%-1
v� �vowel$,�w$,K%,1))
�a$=�w$,K%-1)
�b$=�w$,K%+1)
��5)a$"_"b$�31)w$'
��
�� �plurals:K%=�w$
�b$=�w$,3):q$=""
�9� b$="xes" � b$="ses" � b$="hes" � b$="oes" q$=�plur1
�� b$="ves" q$=�plur2
�� b$="ies" q$=�plur3
�� q$="" q$=�plurX
�� q$="" q$=�plur4
�p$=�12,"_")
��2)q$�12)p$�28)w$'
�
� �plur1=�w$,K%-2)
� �plur2=�w$,K%-3)+"f"
 � �plur3=�w$,K%-3)+"y"
*� �plur4=�w$,K%-1)
4� �plurX
>� w$="sheep" =w$
H=""
R
� �quit=�
�
00000000  0d 00 0a 17 f4 20 57 6f  72 6b 73 68 65 65 74 20  |..... Worksheet |
00000010  57 6f 72 6b 6f 75 74 0d  00 14 1a f4 20 62 79 20  |Workout..... by |
00000020  47 6f 72 64 6f 6e 20 4c  65 74 68 62 72 69 64 67  |Gordon Lethbridg|
00000030  65 0d 00 1e 18 f4 20 28  63 29 20 54 68 65 20 4d  |e..... (c) The M|
00000040  69 63 72 6f 20 55 73 65  72 0d 00 28 06 eb 37 0d  |icro User..(..7.|
00000050  00 32 09 f2 69 6e 69 74  0d 00 3c 0e ee 20 85 20  |.2..init..<.. . |
00000060  f2 65 72 72 6f 72 0d 00  46 05 f5 0d 00 50 0c 4f  |.error..F....P.O|
00000070  25 3d a4 6d 65 6e 75 0d  00 5a 20 e7 20 4f 25 3c  |%=.menu..Z . O%<|
00000080  6f 70 74 73 25 20 f2 68  65 61 64 28 6f 70 74 24  |opts% .head(opt$|
00000090  28 4f 25 2c 31 29 29 0d  00 64 1b 71 75 69 74 3d  |(O%,1))..d.quit=|
000000a0  a0 28 22 46 4e 22 2b 6f  70 74 24 28 4f 25 2c 32  |.("FN"+opt$(O%,2|
000000b0  29 29 0d 00 6e 0a fd 20  71 75 69 74 0d 00 78 09  |))..n.. quit..x.|
000000c0  f2 71 75 69 74 0d 00 82  05 e0 0d 00 8c 17 dd 20  |.quit.......... |
000000d0  f2 69 6e 69 74 3a f2 6f  66 66 3a 2a 46 58 34 2c  |.init:.off:*FX4,|
000000e0  31 0d 00 96 1b 6d 61 78  77 6f 72 64 73 3d 31 30  |1....maxwords=10|
000000f0  30 3a 6e 75 6d 77 6f 72  64 73 3d 30 0d 00 a0 17  |0:numwords=0....|
00000100  de 20 77 6f 72 64 24 28  6d 61 78 77 6f 72 64 73  |. word$(maxwords|
00000110  2b 31 29 0d 00 aa 19 6d  61 78 72 65 70 6c 73 3d  |+1)....maxrepls=|
00000120  35 3a 6e 75 6d 72 65 70  6c 73 3d 30 0d 00 b4 17  |5:numrepls=0....|
00000130  de 20 72 65 70 6c 24 28  6d 61 78 72 65 70 6c 73  |. repl$(maxrepls|
00000140  2b 31 29 0d 00 be 1b f3  20 6f 70 74 73 25 3a de  |+1)..... opts%:.|
00000150  20 6f 70 74 24 28 6f 70  74 73 25 2c 32 29 0d 00  | opt$(opts%,2)..|
00000160  c8 12 e3 20 4f 25 3d 31  20 b8 20 6f 70 74 73 25  |... O%=1 . opts%|
00000170  0d 00 d2 1b f3 20 6f 70  74 24 28 4f 25 2c 31 29  |..... opt$(O%,1)|
00000180  2c 6f 70 74 24 28 4f 25  2c 32 29 0d 00 dc 15 6f  |,opt$(O%,2)....o|
00000190  70 74 73 24 3d 6f 70 74  73 24 2b c3 4f 25 3a ed  |pts$=opts$+.O%:.|
000001a0  0d 00 e6 1a f3 20 74 79  70 65 73 3a de 20 74 79  |..... types:. ty|
000001b0  70 65 24 28 74 79 70 65  73 29 0d 00 f0 12 e3 20  |pe$(types)..... |
000001c0  54 25 3d 31 20 b8 20 74  79 70 65 73 0d 00 fa 18  |T%=1 . types....|
000001d0  f3 20 74 79 70 65 24 28  54 25 29 3a ed 3a 74 79  |. type$(T%):.:ty|
000001e0  70 65 3d 31 0d 01 04 0f  6f 66 24 3d 22 22 3a 46  |pe=1....of$="":F|
000001f0  25 3d 30 0d 01 0e 18 de  20 66 25 32 35 36 3a 6f  |%=0..... f%256:o|
00000200  73 66 69 6e 64 3d 26 46  46 43 45 0d 01 18 21 45  |sfind=&FFCE...!E|
00000210  25 3d 30 3a 6f 73 62 79  74 65 3d 26 46 46 46 34  |%=0:osbyte=&FFF4|
00000220  3a 6f 73 63 6c 69 3d 26  46 46 46 37 0d 01 22 24  |:oscli=&FFF7.."$|
00000230  6c 6f 24 3d 22 61 62 63  64 65 66 67 68 69 6a 6b  |lo$="abcdefghijk|
00000240  6c 6d 6e 6f 70 71 72 73  74 75 76 77 78 79 7a 22  |lmnopqrstuvwxyz"|
00000250  0d 01 2c 24 68 69 24 3d  22 41 42 43 44 45 46 47  |..,$hi$="ABCDEFG|
00000260  48 49 4a 4b 4c 4d 4e 4f  50 51 52 53 54 55 56 57  |HIJKLMNOPQRSTUVW|
00000270  58 59 5a 22 0d 01 36 22  61 6c 66 24 3d 6c 6f 24  |XYZ"..6"alf$=lo$|
00000280  2b 68 69 24 3a 6e 75 6d  24 3d 22 30 31 32 33 34  |+hi$:num$="01234|
00000290  35 36 37 38 39 22 0d 01  40 1a 70 75 6e 63 24 3d  |56789"..@.punc$=|
000002a0  22 21 23 24 25 26 28 29  3d 2d 5e 7c 40 3a 2e 22  |"!#$%&()=-^|@:."|
000002b0  0d 01 4a 12 76 6f 77 65  6c 24 3d 22 61 65 69 6f  |..J.vowel$="aeio|
000002c0  75 22 0d 01 54 18 61 6c  6c 24 3d 61 6c 66 24 2b  |u"..T.all$=alf$+|
000002d0  6e 75 6d 24 2b 70 75 6e  63 24 0d 01 5e 14 64 6c  |num$+punc$..^.dl|
000002e0  24 3d bd 31 32 37 3a 63  72 24 3d bd 31 33 0d 01  |$=.127:cr$=.13..|
000002f0  68 15 63 6f 70 69 65 73  3d 31 3a 6c 69 6e 65 73  |h.copies=1:lines|
00000300  3d 32 34 0d 01 72 10 f2  77 69 6e 64 6f 77 28 30  |=24..r..window(0|
00000310  29 3a e1 0d 01 7c 07 dc  20 34 0d 01 86 15 dc 20  |):...|.. 4..... |
00000320  4c 6f 61 64 20 77 6f 72  64 73 2c 6c 6f 61 64 0d  |Load words,load.|
00000330  01 90 19 dc 20 53 65 74  20 6f 70 74 69 6f 6e 73  |.... Set options|
00000340  2c 6f 70 74 69 6f 6e 73  0d 01 9a 1b dc 20 50 72  |,options..... Pr|
00000350  69 6e 74 20 77 6f 72 6b  73 68 65 65 74 2c 70 72  |int worksheet,pr|
00000360  69 6e 74 0d 01 a4 0f dc  20 51 75 69 74 2c 71 75  |int..... Quit,qu|
00000370  69 74 0d 01 ae 07 dc 20  33 0d 01 b8 1d dc 20 52  |it..... 3..... R|
00000380  65 70 6c 61 63 65 2c 4d  61 67 69 63 20 45 2c 50  |eplace,Magic E,P|
00000390  6c 75 72 61 6c 73 0d 01  c2 0a dd 20 f2 6f 66 66  |lurals..... .off|
000003a0  0d 01 cc 16 ef 32 33 2c  31 2c 30 3b 30 3b 30 3b  |.....23,1,0;0;0;|
000003b0  30 3b 30 3b 3a e1 0d 01  d6 09 dd 20 f2 6f 6e 0d  |0;0;:...... .on.|
000003c0  01 e0 16 ef 32 33 2c 31  2c 31 3b 30 3b 30 3b 30  |....23,1,1;0;0;0|
000003d0  3b 30 3b 3a e1 0d 01 ea  13 dd 20 f2 65 72 72 6f  |;0;:...... .erro|
000003e0  72 3a 2a 46 58 33 2c 34  0d 01 f4 16 f2 6f 66 66  |r:*FX3,4.....off|
000003f0  3a 46 25 3d a4 63 6c 6f  73 65 28 46 25 29 0d 01  |:F%=.close(F%)..|
00000400  fe 2f e7 20 9f 3d 31 37  20 80 20 45 25 3e 30 20  |./. .=17 . E%>0 |
00000410  45 25 3d 30 3a f2 6d 65  73 73 61 67 65 28 65 24  |E%=0:.message(e$|
00000420  29 3a 5a 25 3d a4 69 6e  28 22 20 22 29 0d 02 08  |):Z%=.in(" ")...|
00000430  13 e7 20 9f 3d 31 37 20  80 20 45 25 3d 30 20 e1  |.. .=17 . E%=0 .|
00000440  0d 02 12 0f ee 20 85 20  87 3a f2 71 75 69 74 0d  |..... . .:.quit.|
00000450  02 1c 0f f6 3a f1 22 20  61 74 20 22 3b 9e 0d 02  |....:." at ";...|
00000460  26 05 e0 0d 02 30 15 dd  20 f2 6d 65 73 73 61 67  |&....0.. .messag|
00000470  65 28 6d 24 29 3a ef 37  0d 02 3a 1a f2 77 69 6e  |e(m$):.7..:..win|
00000480  64 6f 77 28 32 29 3a f2  63 6e 28 6d 24 2c 31 29  |dow(2):.cn(m$,1)|
00000490  3a e1 0d 02 44 16 dd 20  f2 6f 73 28 24 66 25 29  |:...D.. .os($f%)|
000004a0  3a ea 20 58 25 2c 59 25  0d 02 4e 1a 58 25 3d 66  |:. X%,Y%..N.X%=f|
000004b0  25 3a 59 25 3d 58 25 81  32 35 36 3a d6 6f 73 63  |%:Y%=X%.256:.osc|
000004c0  6c 69 0d 02 58 05 e1 0d  02 62 11 dd 20 f2 77 69  |li..X....b.. .wi|
000004d0  6e 64 6f 77 28 57 25 29  0d 02 6c 24 e7 20 57 25  |ndow(W%)..l$. W%|
000004e0  3d 30 20 6c 78 25 3d 30  3a 62 79 25 3d 32 34 3a  |=0 lx%=0:by%=24:|
000004f0  72 78 25 3d 33 39 3a 74  79 25 3d 30 0d 02 76 24  |rx%=39:ty%=0..v$|
00000500  e7 20 57 25 3d 31 20 6c  78 25 3d 33 3a 62 79 25  |. W%=1 lx%=3:by%|
00000510  3d 32 31 3a 72 78 25 3d  33 36 3a 74 79 25 3d 32  |=21:rx%=36:ty%=2|
00000520  0d 02 80 25 e7 20 57 25  3d 32 20 6c 78 25 3d 33  |...%. W%=2 lx%=3|
00000530  3a 62 79 25 3d 32 34 3a  72 78 25 3d 33 36 3a 74  |:by%=24:rx%=36:t|
00000540  79 25 3d 32 32 0d 02 8a  17 ef 32 38 6c 78 25 62  |y%=22.....28lx%b|
00000550  79 25 72 78 25 74 79 25  31 32 3a e1 0d 02 94 10  |y%rx%ty%12:.....|
00000560  dd 20 a4 63 6c 6f 73 65  28 46 25 29 0d 02 9e 15  |. .close(F%)....|
00000570  e7 20 46 25 3c 3e 30 20  d9 23 46 25 3a 46 25 3d  |. F%<>0 .#F%:F%=|
00000580  30 0d 02 a8 07 3d 46 25  0d 02 b2 12 dd 20 a4 6f  |0....=F%..... .o|
00000590  70 65 6e 69 6e 28 24 66  25 29 0d 02 bc 14 ea 20  |penin($f%)..... |
000005a0  41 25 2c 58 25 2c 59 25  3a 58 25 3d 66 25 0d 02  |A%,X%,Y%:X%=f%..|
000005b0  c6 14 59 25 3d 58 25 81  32 35 36 3a 41 25 3d 26  |..Y%=X%.256:A%=&|
000005c0  34 30 0d 02 d0 12 3d ba  28 6f 73 66 69 6e 64 29  |40....=.(osfind)|
000005d0  80 26 46 46 0d 02 da 16  dd 20 a4 66 69 6c 65 6e  |.&FF..... .filen|
000005e0  61 6d 65 28 74 24 2c 59  25 29 0d 02 e4 13 f1 8a  |ame(t$,Y%)......|
000005f0  31 30 2c 59 25 29 74 24  22 20 3a 20 22 0d 02 ee  |10,Y%)t$" : "...|
00000600  1e 6f 66 24 3d a4 73 74  72 69 6e 67 28 6f 66 24  |.of$=.string(of$|
00000610  2c 38 2c 59 25 2b 32 2c  32 30 29 0d 02 f8 08 3d  |,8,Y%+2,20)....=|
00000620  6f 66 24 0d 03 02 14 dd  20 a4 6e 75 6d 28 74 24  |of$..... .num(t$|
00000630  2c 4e 25 2c 59 25 29 0d  03 0c 13 f1 8a 38 2c 59  |,N%,Y%)......8,Y|
00000640  25 29 74 24 22 20 3a 20  22 3b 0d 03 16 18 3d bb  |%)t$" : ";....=.|
00000650  a4 73 74 72 69 6e 67 28  c3 4e 25 2c b1 2c bc 2c  |.string(.N%,.,.,|
00000660  34 29 0d 03 20 1a dd 20  a4 73 74 72 69 6e 67 28  |4).. .. .string(|
00000670  73 24 2c 58 25 2c 59 25  2c 4c 25 29 0d 03 2a 15  |s$,X%,Y%,L%)..*.|
00000680  ea 20 49 25 2c 50 25 2c  61 24 3a 50 25 3d a9 73  |. I%,P%,a$:P%=.s|
00000690  24 0d 03 34 14 ef 33 31  58 25 2b 4c 25 2b 32 59  |$..4..31X%+L%+2Y|
000006a0  25 2c 31 35 36 0d 03 3e  19 ef 33 31 58 25 2d 33  |%,156..>..31X%-3|
000006b0  59 25 2c 31 33 32 2c 31  35 37 2c 31 33 31 0d 03  |Y%,132,157,131..|
000006c0  48 12 f1 89 4c 25 8a 58  25 2c 59 25 29 73 24 3b  |H...L%.X%,Y%)s$;|
000006d0  0d 03 52 0d f5 20 61 24  3d 61 6c 6c 24 0d 03 5c  |..R.. a$=all$..\|
000006e0  18 e7 20 50 25 3e 30 20  61 24 3d 61 24 2b 64 6c  |.. P%>0 a$=a$+dl|
000006f0  24 2b 63 72 24 0d 03 66  16 e7 20 50 25 3d 4c 25  |$+cr$..f.. P%=L%|
00000700  20 61 24 3d 64 6c 24 2b  63 72 24 0d 03 70 15 69  | a$=dl$+cr$..p.i|
00000710  24 3d c1 61 24 2c a4 69  6e 28 61 24 29 2c 31 29  |$=.a$,.in(a$),1)|
00000720  0d 03 7a 45 e7 20 69 24  3d 64 6c 24 20 ef 31 32  |..zE. i$=dl$ .12|
00000730  37 3a 50 25 3d 50 25 2d  31 3a 73 24 3d c0 73 24  |7:P%=P%-1:s$=.s$|
00000740  2c 50 25 29 20 8b e7 20  69 24 3c 3e 63 72 24 20  |,P%) .. i$<>cr$ |
00000750  f1 69 24 3b 3a 73 24 3d  73 24 2b 69 24 3a 50 25  |.i$;:s$=s$+i$:P%|
00000760  3d 50 25 2b 31 0d 03 84  10 fd 20 69 24 3d 63 72  |=P%+1..... i$=cr|
00000770  24 3a 3d 73 24 0d 03 8e  19 dd 20 f2 67 65 6e 45  |$:=s$..... .genE|
00000780  72 72 6f 72 28 65 24 29  3a 45 25 3d 39 39 0d 03  |rror(e$):E%=99..|
00000790  98 14 41 25 3d 31 32 35  3a d6 6f 73 62 79 74 65  |..A%=125:.osbyte|
000007a0  3a e1 0d 03 a2 10 dd 20  f2 71 75 69 74 3a 2a 46  |:...... .quit:*F|
000007b0  58 34 0d 03 ac 10 f2 6f  6e 3a ef 32 36 2c 31 32  |X4.....on:.26,12|
000007c0  3a e1 0d 03 b6 10 dd 20  a4 6d 65 6e 75 3a ea 20  |:...... .menu:. |
000007d0  4f 25 0d 03 c0 1e f2 68  65 61 64 28 22 57 6f 72  |O%.....head("Wor|
000007e0  6b 73 68 65 65 74 20 57  6f 72 6b 6f 75 74 22 29  |ksheet Workout")|
000007f0  0d 03 ca 12 e3 20 4f 25  3d 31 20 b8 20 6f 70 74  |..... O%=1 . opt|
00000800  73 25 0d 03 d4 17 f2 6f  75 74 28 4f 25 2c 36 2c  |s%.....out(O%,6,|
00000810  4f 25 2a 32 2b 31 29 3a  ed 0d 03 de 18 f1 27 89  |O%*2+1):......'.|
00000820  31 30 22 45 6e 74 65 72  20 63 68 6f 69 63 65 22  |10"Enter choice"|
00000830  3b 0d 03 e8 0f 3d a4 69  6e 28 6f 70 74 73 24 29  |;....=.in(opts$)|
00000840  0d 03 f2 0f dd 20 f2 68  65 61 64 28 74 24 29 0d  |..... .head(t$).|
00000850  03 fc 0e f2 77 69 6e 64  6f 77 28 30 29 0d 04 06  |....window(0)...|
00000860  13 ea 20 4c 25 3a e3 20  4c 25 3d 30 20 b8 20 31  |.. L%:. L%=0 . 1|
00000870  0d 04 10 18 ef 33 31 2c  30 2c 4c 25 2c 31 33 32  |.....31,0,L%,132|
00000880  2c 31 35 37 2c 31 33 31  0d 04 1a 0f ed 3a f2 64  |,157,131.....:.d|
00000890  62 28 74 24 2c 30 29 0d  04 24 10 e3 20 4c 25 3d  |b(t$,0)..$.. L%=|
000008a0  32 32 20 b8 20 32 34 0d  04 2e 18 ef 33 31 2c 30  |22 . 24.....31,0|
000008b0  2c 4c 25 2c 31 33 32 2c  31 35 37 2c 31 33 31 0d  |,L%,132,157,131.|
000008c0  04 38 12 ed 3a f2 77 69  6e 64 6f 77 28 31 29 3a  |.8..:.window(1):|
000008d0  e1 0d 04 42 10 dd 20 f2  64 62 28 74 24 2c 59 25  |...B.. .db(t$,Y%|
000008e0  29 0d 04 4c 17 f2 63 6e  28 bd 31 34 31 2b 74 24  |)..L..cn(.141+t$|
000008f0  2b 22 20 22 2c 59 25 29  0d 04 56 19 f2 63 6e 28  |+" ",Y%)..V..cn(|
00000900  bd 31 34 31 2b 74 24 2b  22 20 22 2c 59 25 2b 31  |.141+t$+" ",Y%+1|
00000910  29 0d 04 60 05 e1 0d 04  6a 10 dd 20 f2 63 6e 28  |)..`....j.. .cn(|
00000920  74 24 2c 59 25 29 0d 04  74 1c f1 8a 28 72 78 25  |t$,Y%)..t...(rx%|
00000930  2d 6c 78 25 2d a9 74 24  29 2f 32 2c 59 25 29 74  |-lx%-.t$)/2,Y%)t|
00000940  24 3b 0d 04 7e 05 e1 0d  04 88 14 dd 20 f2 6f 75  |$;..~....... .ou|
00000950  74 28 4f 25 2c 58 25 2c  59 25 29 0d 04 92 18 ea  |t(O%,X%,Y%).....|
00000960  20 74 24 3a 74 24 3d bd  31 32 39 2b c3 4f 25 2b  | t$:t$=.129+.O%+|
00000970  22 2e 22 0d 04 9c 19 74  24 3d 74 24 2b bd 31 33  |"."....t$=t$+.13|
00000980  34 2b 6f 70 74 24 28 4f  25 2c 31 29 0d 04 a6 10  |4+opt$(O%,1)....|
00000990  f1 8a 58 25 2c 59 25 29  74 24 3a e1 0d 04 b0 0d  |..X%,Y%)t$:.....|
000009a0  dd 20 a4 69 6e 28 6b 24  29 0d 04 ba 0e ea 20 49  |. .in(k$)..... I|
000009b0  25 3a f5 20 f2 6f 6e 0d  04 c4 12 49 25 3d a7 6b  |%:. .on....I%=.k|
000009c0  24 2c be 29 3a f2 6f 66  66 0d 04 ce 15 ef 2d 37  |$,.):.off.....-7|
000009d0  2a 28 49 25 3d 30 29 3a  fd 20 49 25 3e 30 0d 04  |*(I%=0):. I%>0..|
000009e0  d8 12 73 68 69 66 74 25  3d a6 2d 31 3a 3d 49 25  |..shift%=.-1:=I%|
000009f0  0d 04 e2 0e dd 20 f2 73  75 72 65 3a ef 37 0d 04  |..... .sure:.7..|
00000a00  ec 23 f2 6d 65 73 73 61  67 65 28 22 41 72 65 20  |.#.message("Are |
00000a10  79 6f 75 20 73 75 72 65  3f 20 28 79 2f 6e 29 22  |you sure? (y/n)"|
00000a20  29 0d 04 f6 28 e7 20 a4  69 6e 28 22 59 79 4e 6e  |)...(. .in("YyNn|
00000a30  22 29 3e 32 20 f2 67 65  6e 45 72 72 6f 72 28 22  |")>2 .genError("|
00000a40  41 62 6f 72 74 65 64 22  29 0d 05 00 10 f2 77 69  |Aborted").....wi|
00000a50  6e 64 6f 77 28 32 29 3a  e1 0d 05 0a 13 dd 20 a4  |ndow(2):...... .|
00000a60  6c 6f 61 64 3a ea 20 4c  25 2c 66 24 0d 05 14 1a  |load:. L%,f$....|
00000a70  66 24 3d a4 66 69 6c 65  6e 61 6d 65 28 22 4c 6f  |f$=.filename("Lo|
00000a80  61 64 22 2c 33 29 0d 05  1e 12 46 25 3d a4 6f 70  |ad",3)....F%=.op|
00000a90  65 6e 69 6e 28 66 24 29  0d 05 28 2d e7 20 46 25  |enin(f$)..(-. F%|
00000aa0  3d 30 20 f2 67 65 6e 45  72 72 6f 72 28 22 43 61  |=0 .genError("Ca|
00000ab0  6e 27 74 20 6f 70 65 6e  20 69 6e 70 75 74 20 66  |n't open input f|
00000ac0  69 6c 65 22 29 0d 05 32  1f e8 23 46 25 2c 74 79  |ile")..2..#F%,ty|
00000ad0  70 65 2c 6e 75 6d 72 65  70 6c 73 2c 6e 75 6d 77  |pe,numrepls,numw|
00000ae0  6f 72 64 73 0d 05 3c 2f  e7 20 74 79 70 65 3e 74  |ords..</. type>t|
00000af0  79 70 65 73 20 f2 67 65  6e 45 72 72 6f 72 28 22  |ypes .genError("|
00000b00  55 6e 6b 6e 6f 77 6e 20  66 69 6c 65 20 74 79 70  |Unknown file typ|
00000b10  65 22 29 0d 05 46 33 e7  20 6e 75 6d 77 6f 72 64  |e")..F3. numword|
00000b20  73 3e 6d 61 78 77 6f 72  64 73 20 f2 67 65 6e 45  |s>maxwords .genE|
00000b30  72 72 6f 72 28 22 54 6f  6f 20 6d 61 6e 79 20 77  |rror("Too many w|
00000b40  6f 72 64 73 22 29 0d 05  50 2e e7 20 6e 75 6d 77  |ords")..P.. numw|
00000b50  6f 72 64 73 3c 32 20 f2  67 65 6e 45 72 72 6f 72  |ords<2 .genError|
00000b60  28 22 4e 6f 74 20 65 6e  6f 75 67 68 20 77 6f 72  |("Not enough wor|
00000b70  64 73 22 29 0d 05 5a 3a  e7 20 6e 75 6d 72 65 70  |ds")..Z:. numrep|
00000b80  6c 73 3e 6d 61 78 72 65  70 6c 73 20 f2 67 65 6e  |ls>maxrepls .gen|
00000b90  45 72 72 6f 72 28 22 54  6f 6f 20 6d 61 6e 79 20  |Error("Too many |
00000ba0  72 65 70 6c 61 63 65 6d  65 6e 74 73 22 29 0d 05  |replacements")..|
00000bb0  64 36 e7 20 74 79 70 65  3d 31 20 80 20 6e 75 6d  |d6. type=1 . num|
00000bc0  72 65 70 6c 73 3d 30 20  f2 67 65 6e 45 72 72 6f  |repls=0 .genErro|
00000bd0  72 28 22 4e 6f 20 72 65  70 6c 61 63 65 6d 65 6e  |r("No replacemen|
00000be0  74 73 22 29 0d 05 6e 15  e3 20 4c 25 3d 31 20 b8  |ts")..n.. L%=1 .|
00000bf0  20 6e 75 6d 72 65 70 6c  73 0d 05 78 14 e8 23 46  | numrepls..x..#F|
00000c00  25 2c 72 65 70 6c 24 28  4c 25 29 3a ed 0d 05 82  |%,repl$(L%):....|
00000c10  15 e3 20 4c 25 3d 31 20  b8 20 6e 75 6d 77 6f 72  |.. L%=1 . numwor|
00000c20  64 73 0d 05 8c 14 e8 23  46 25 2c 77 6f 72 64 24  |ds.....#F%,word$|
00000c30  28 4c 25 29 3a ed 0d 05  96 14 46 25 3d a4 63 6c  |(L%):.....F%=.cl|
00000c40  6f 73 65 28 46 25 29 3a  3d 30 0d 05 a0 0e dd 20  |ose(F%):=0..... |
00000c50  a4 6f 70 74 69 6f 6e 73  0d 05 aa 2c 63 6f 70 69  |.options...,copi|
00000c60  65 73 3d a4 6e 75 6d 28  22 4e 75 6d 62 65 72 20  |es=.num("Number |
00000c70  6f 66 20 63 6f 70 69 65  73 22 2c 63 6f 70 69 65  |of copies",copie|
00000c80  73 2c 32 29 0d 05 b4 29  6c 69 6e 65 73 3d a4 6e  |s,2)...)lines=.n|
00000c90  75 6d 28 22 4e 75 6d 62  65 72 20 6f 66 20 6c 69  |um("Number of li|
00000ca0  6e 65 73 22 2c 6c 69 6e  65 73 2c 34 29 0d 05 be  |nes",lines,4)...|
00000cb0  06 3d 30 0d 05 c8 0c dd  20 a4 70 72 69 6e 74 0d  |.=0..... .print.|
00000cc0  05 d2 20 f2 6d 65 73 73  61 67 65 28 22 52 65 61  |.. .message("Rea|
00000cd0  64 79 20 70 72 69 6e 74  65 72 2e 2e 2e 22 29 0d  |dy printer...").|
00000ce0  05 dc 14 5a 25 3d a4 69  6e 28 22 20 22 29 3a 51  |...Z%=.in(" "):Q|
00000cf0  25 3d 91 0d 05 e6 13 e3  20 43 25 3d 31 20 b8 20  |%=...... C%=1 . |
00000d00  63 6f 70 69 65 73 0d 05  f0 16 5a 25 3d b3 28 2d  |copies....Z%=.(-|
00000d10  51 25 29 3a 6c 61 73 74  25 3d 2d 31 0d 05 fa 30  |Q%):last%=-1...0|
00000d20  f2 6d 65 73 73 61 67 65  28 22 43 6f 70 79 20 22  |.message("Copy "|
00000d30  2b c3 43 25 2b 22 20 6f  66 20 22 2b c3 63 6f 70  |+.C%+" of "+.cop|
00000d40  69 65 73 29 3a 2a 46 58  33 2c 31 30 0d 06 04 0f  |ies):*FX3,10....|
00000d50  f2 68 65 61 64 65 72 28  43 25 29 0d 06 0e 12 e3  |.header(C%).....|
00000d60  20 4c 25 3d 31 20 b8 20  6c 69 6e 65 73 0d 06 18  | L%=1 . lines...|
00000d70  16 f2 6c 69 6e 65 3a ed  3a ef 31 32 3a 2a 46 58  |..line:.:.12:*FX|
00000d80  33 2c 34 0d 06 22 08 ed  3a 3d 30 0d 06 2c 1e dd  |3,4.."..:=0..,..|
00000d90  20 f2 68 65 61 64 65 72  28 43 25 29 3a ea 74 31  | .header(C%):.t1|
00000da0  24 2c 74 32 24 2c 74 33  24 0d 06 36 78 e7 20 74  |$,t2$,t3$..6x. t|
00000db0  79 70 65 3d 31 20 74 31  24 3d 22 54 68 65 72 65  |ype=1 t1$="There|
00000dc0  20 61 72 65 20 6c 65 74  74 65 72 73 20 6d 69 73  | are letters mis|
00000dd0  73 69 6e 67 20 66 72 6f  6d 22 3a 74 32 24 3d 22  |sing from":t2$="|
00000de0  65 61 63 68 20 6f 66 20  74 68 65 73 65 20 77 6f  |each of these wo|
00000df0  72 64 73 2e 20 43 61 6e  20 79 6f 75 20 77 6f 72  |rds. Can you wor|
00000e00  6b 20 6f 75 74 22 3a 74  33 24 3d 22 77 68 69 63  |k out":t3$="whic|
00000e10  68 20 6f 6e 65 73 20 74  68 65 79 20 61 72 65 3f  |h ones they are?|
00000e20  22 0d 06 40 81 e7 20 74  79 70 65 3d 32 20 74 31  |"..@.. type=2 t1|
00000e30  24 3d 22 54 68 65 72 65  20 69 73 20 6f 6e 65 20  |$="There is one |
00000e40  6c 65 74 74 65 72 20 6d  69 73 73 69 6e 67 20 66  |letter missing f|
00000e50  72 6f 6d 20 65 61 63 68  20 6f 66 22 3a 74 32 24  |rom each of":t2$|
00000e60  3d 22 74 68 65 73 65 20  4d 41 47 49 43 20 45 20  |="these MAGIC E |
00000e70  77 6f 72 64 73 2e 20 43  61 6e 20 79 6f 75 20 77  |words. Can you w|
00000e80  6f 72 6b 20 6f 75 74 22  3a 74 33 24 3d 22 77 68  |ork out":t3$="wh|
00000e90  69 63 68 20 6c 65 74 74  65 72 20 69 74 20 69 73  |ich letter it is|
00000ea0  3f 22 0d 06 4a 74 e7 20  74 79 70 65 3d 33 20 74  |?"..Jt. type=3 t|
00000eb0  31 24 3d 22 43 68 61 6e  67 65 20 74 68 65 73 65  |1$="Change these|
00000ec0  20 73 69 6e 67 75 6c 61  72 20 6e 6f 75 6e 73 20  | singular nouns |
00000ed0  74 6f 22 3a 74 32 24 3d  22 74 68 65 69 72 20 70  |to":t2$="their p|
00000ee0  6c 75 72 61 6c 20 66 6f  72 6d 2e 20 59 6f 75 20  |lural form. You |
00000ef0  77 69 6c 6c 20 68 61 76  65 22 3a 74 33 24 3d 22  |will have":t3$="|
00000f00  74 6f 20 6d 61 6b 65 20  73 6f 6d 65 20 63 68 61  |to make some cha|
00000f10  6e 67 65 73 2e 22 0d 06  54 2f f1 22 4e 75 6d 62  |nges."..T/."Numb|
00000f20  65 72 20 22 3b 43 25 22  20 22 74 79 70 65 24 28  |er ";C%" "type$(|
00000f30  74 79 70 65 29 8a 36 30  29 22 4e 75 6d 62 65 72  |type).60)"Number|
00000f40  20 22 3b 43 25 0d 06 5e  10 f1 74 31 24 27 74 32  | ";C%..^..t1$'t2|
00000f50  24 27 74 33 24 0d 06 68  6d f1 22 59 6f 75 20 63  |$'t3$..hm."You c|
00000f60  61 6e 20 68 61 76 65 20  74 68 65 20 73 61 6d 65  |an have the same|
00000f70  20 77 6f 72 64 20 6d 6f  72 65 22 27 22 74 68 61  | word more"'"tha|
00000f80  6e 20 6f 6e 63 65 20 6f  6e 20 74 68 65 20 73 68  |n once on the sh|
00000f90  65 65 74 2e 20 57 68 65  6e 20 79 6f 75 22 27 22  |eet. When you"'"|
00000fa0  68 61 76 65 20 66 69 6e  69 73 68 65 64 20 63 68  |have finished ch|
00000fb0  65 63 6b 20 79 6f 75 72  20 61 6e 73 77 65 72 73  |eck your answers|
00000fc0  2e 22 0d 06 72 2b f1 27  22 4e 4f 20 50 45 45 50  |."..r+.'"NO PEEP|
00000fd0  49 4e 47 20 75 6e 74 69  6c 20 79 6f 75 20 68 61  |ING until you ha|
00000fe0  76 65 20 66 69 6e 69 73  68 65 64 2e 22 0d 06 7c  |ve finished."..||
00000ff0  07 f1 3a e1 0d 06 86 0f  dd 20 f2 6c 69 6e 65 3a  |..:...... .line:|
00001000  ef 31 34 0d 06 90 14 f5  20 57 25 3d b3 28 6e 75  |.14..... W%=.(nu|
00001010  6d 77 6f 72 64 73 29 0d  06 9a 18 fd 20 57 25 3c  |mwords)..... W%<|
00001020  3e 6c 61 73 74 25 3a 6c  61 73 74 25 3d 57 25 0d  |>last%:last%=W%.|
00001030  06 a4 10 77 24 3d 77 6f  72 64 24 28 57 25 29 0d  |...w$=word$(W%).|
00001040  06 ae 15 e7 20 74 79 70  65 3d 31 20 f2 72 65 70  |.... type=1 .rep|
00001050  6c 61 63 65 0d 06 b8 15  e7 20 74 79 70 65 3d 32  |lace..... type=2|
00001060  20 f2 6d 61 67 69 63 5f  65 0d 06 c2 15 e7 20 74  | .magic_e..... t|
00001070  79 70 65 3d 33 20 f2 70  6c 75 72 61 6c 73 0d 06  |ype=3 .plurals..|
00001080  cc 09 ef 32 30 3a e1 0d  06 d6 0e dd 20 f2 72 65  |...20:...... .re|
00001090  70 6c 61 63 65 0d 06 e0  05 f5 0d 06 ea 25 e7 20  |place........%. |
000010a0  6e 75 6d 72 65 70 6c 73  3d 31 20 4b 25 3d 31 20  |numrepls=1 K%=1 |
000010b0  8b 4b 25 3d b3 28 6e 75  6d 72 65 70 6c 73 29 0d  |.K%=.(numrepls).|
000010c0  06 f4 18 66 6f 75 6e 64  3d b9 3a 70 24 3d 72 65  |...found=.:p$=re|
000010d0  70 6c 24 28 4b 25 29 0d  06 fe 18 71 24 3d a4 64  |pl$(K%)....q$=.d|
000010e0  6f 52 65 70 6c 61 63 65  28 77 24 2c 70 24 29 0d  |oReplace(w$,p$).|
000010f0  07 08 0b fd 20 66 6f 75  6e 64 0d 07 12 17 f1 8a  |.... found......|
00001100  35 29 71 24 8a 32 35 29  70 24 8a 33 31 29 77 24  |5)q$.25)p$.31)w$|
00001110  27 0d 07 1c 05 e1 0d 07  26 17 dd 20 a4 64 6f 52  |'.......&.. .doR|
00001120  65 70 6c 61 63 65 28 77  24 2c 70 24 29 0d 07 30  |eplace(w$,p$)..0|
00001130  19 ea 20 50 25 2c 61 24  2c 62 24 3a 50 25 3d a7  |.. P%,a$,b$:P%=.|
00001140  77 24 2c 70 24 29 0d 07  3a 16 e7 20 50 25 3d 30  |w$,p$)..:.. P%=0|
00001150  20 66 6f 75 6e 64 3d a3  3a 3d 22 22 0d 07 44 10  | found=.:=""..D.|
00001160  61 24 3d c0 77 24 2c 50  25 2d 31 29 0d 07 4e 12  |a$=.w$,P%-1)..N.|
00001170  62 24 3d c1 77 24 2c 50  25 2b a9 70 24 29 0d 07  |b$=.w$,P%+.p$)..|
00001180  58 14 3d 61 24 2b c4 a9  70 24 2c 22 5f 22 29 2b  |X.=a$+..p$,"_")+|
00001190  62 24 0d 07 62 15 dd 20  f2 6d 61 67 69 63 5f 65  |b$..b.. .magic_e|
000011a0  3a 4b 25 3d a9 77 24 0d  07 6c 0d f5 20 4b 25 3d  |:K%=.w$..l.. K%=|
000011b0  4b 25 2d 31 0d 07 76 18  fd 20 a7 76 6f 77 65 6c  |K%-1..v.. .vowel|
000011c0  24 2c c1 77 24 2c 4b 25  2c 31 29 29 0d 07 80 10  |$,.w$,K%,1))....|
000011d0  61 24 3d c0 77 24 2c 4b  25 2d 31 29 0d 07 8a 10  |a$=.w$,K%-1)....|
000011e0  62 24 3d c1 77 24 2c 4b  25 2b 31 29 0d 07 94 16  |b$=.w$,K%+1)....|
000011f0  f1 8a 35 29 61 24 22 5f  22 62 24 8a 33 31 29 77  |..5)a$"_"b$.31)w|
00001200  24 27 0d 07 9e 05 e1 0d  07 a8 15 dd 20 f2 70 6c  |$'.......... .pl|
00001210  75 72 61 6c 73 3a 4b 25  3d a9 77 24 0d 07 b2 13  |urals:K%=.w$....|
00001220  62 24 3d c2 77 24 2c 33  29 3a 71 24 3d 22 22 0d  |b$=.w$,3):q$="".|
00001230  07 bc 39 e7 20 62 24 3d  22 78 65 73 22 20 84 20  |..9. b$="xes" . |
00001240  62 24 3d 22 73 65 73 22  20 84 20 62 24 3d 22 68  |b$="ses" . b$="h|
00001250  65 73 22 20 84 20 62 24  3d 22 6f 65 73 22 20 71  |es" . b$="oes" q|
00001260  24 3d a4 70 6c 75 72 31  0d 07 c6 18 e7 20 62 24  |$=.plur1..... b$|
00001270  3d 22 76 65 73 22 20 71  24 3d a4 70 6c 75 72 32  |="ves" q$=.plur2|
00001280  0d 07 d0 18 e7 20 62 24  3d 22 69 65 73 22 20 71  |..... b$="ies" q|
00001290  24 3d a4 70 6c 75 72 33  0d 07 da 15 e7 20 71 24  |$=.plur3..... q$|
000012a0  3d 22 22 20 71 24 3d a4  70 6c 75 72 58 0d 07 e4  |="" q$=.plurX...|
000012b0  15 e7 20 71 24 3d 22 22  20 71 24 3d a4 70 6c 75  |.. q$="" q$=.plu|
000012c0  72 34 0d 07 ee 0f 70 24  3d c4 31 32 2c 22 5f 22  |r4....p$=.12,"_"|
000012d0  29 0d 07 f8 17 f1 8a 32  29 71 24 8a 31 32 29 70  |)......2)q$.12)p|
000012e0  24 8a 32 38 29 77 24 27  0d 08 02 05 e1 0d 08 0c  |$.28)w$'........|
000012f0  16 dd 20 a4 70 6c 75 72  31 3d c0 77 24 2c 4b 25  |.. .plur1=.w$,K%|
00001300  2d 32 29 0d 08 16 1a dd  20 a4 70 6c 75 72 32 3d  |-2)..... .plur2=|
00001310  c0 77 24 2c 4b 25 2d 33  29 2b 22 66 22 0d 08 20  |.w$,K%-3)+"f".. |
00001320  1a dd 20 a4 70 6c 75 72  33 3d c0 77 24 2c 4b 25  |.. .plur3=.w$,K%|
00001330  2d 33 29 2b 22 79 22 0d  08 2a 16 dd 20 a4 70 6c  |-3)+"y"..*.. .pl|
00001340  75 72 34 3d c0 77 24 2c  4b 25 2d 31 29 0d 08 34  |ur4=.w$,K%-1)..4|
00001350  0c dd 20 a4 70 6c 75 72  58 0d 08 3e 14 e7 20 77  |.. .plurX..>.. w|
00001360  24 3d 22 73 68 65 65 70  22 20 3d 77 24 0d 08 48  |$="sheep" =w$..H|
00001370  07 3d 22 22 0d 08 52 0d  dd 20 a4 71 75 69 74 3d  |.=""..R.. .quit=|
00001380  b9 0d ff                                          |...|
00001383
WorkOut.m0
WorkOut.m1
WorkOut.m2
WorkOut.m4
WorkOut.m5