Home » Personal collection » Acorn hard disk » files » DomFord » RoughWork/Video4

RoughWork/Video4

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 hard disk » files » DomFord
Filename: RoughWork/Video4
Read OK:
File size: 1B68 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM SpriteTest - Interquartile range
   20REM By Dominic Ford - May 1995
   30:
   40MODE 7
   50PROCinit
   60PROCanalyse
   70PROCconclusion
   80PROClearn
   90PROCstore
  100MODE 0
  110END
  120:
  130DEFPROCanalyse
  140FOR Y=1 TO yax
  150FOR X=1 TO xax
  160PRINTTAB(3,3);FNpera;"%"
  170SYS "OS_SpriteOp",41,,SPR$,X-1,Y-1 TO ,,,,,C,T
  180bin=0
  190c(C)=c(C)+1
  200FOR bo=1 TO mb
  210IF col(bo)=C AND block(bo,X)>Y-6 THEN bin=bin+1:oproc=bo:PROCobject_add
  220NEXT
  230IF bin=0 THEN PROCobject_make
  240IF bin>1 THEN PROCobject_join
  250NEXT,
  260PROCmcc
  270ENDPROC
  280:
  290DEFPROCmcc
  300CM%=0
  310FOR C=1 TO 15
  320IF c(C)>=CM% THEN CM%=c(C):MCC$=CNA$(C):MCC%=C
  330NEXT
  340ENDPROC
  350:
  360DEFPROCinit
  370DIMo$(7)
  380ON ERROR MODE 0:REPORT:PRINT" at line ";ERL:END
  390SYS "OS_ChangeDynamicArea",3,&8000
  400PRINTCHR$(129);CHR$(141);SPC(3)"Sprite Recognition by D Ford"
  410PRINTCHR$(129);CHR$(141);SPC(3)"Sprite Recognition by D Ford"
  420VDU 28,0,24,39,3,135
  430title$="FILING SYSTEM SELECTION":o$(1)="(R)am":o$(2)="(A)DFS":o$(3)="(S)erver":o$(4)="(C)urrent":PROCmenubar(4)
  440IF o=3 THEN PROCserver
  450IF o=2 THEN PROCadfs
  460IF o=1 THEN *RAM
  470CLS
  480*.
  490INPUT"Sprite file name";SFILE$
  500INPUT"     Sprite name";SPR$
  510maxno=50
  520CLS
  530PRINT'"Please Wait. . ."
  540OSCLI "SLOAD "+SFILE$
  550SYS "OS_SpriteOp",40,,SPR$ TO ,,,xax,yax,H,,MDOE
  560DIMblock(maxno,xax),col(maxno),bmin(maxno,xax),CNA$(15),cols(15)
  570DIMc(15),MCC$(15),MCC(15),CM(15),iw(xax)
  580mb=0
  590FOR C=0 TO 15
  600READ CNA$(C),cols(C)
  610NEXT
  620ENDPROC
  630:
  640DEFPROCserver
  650INPUT"     Server name";NAME$
  660OSCLI"I AM "+NAME$
  670ENDPROC
  680:
  690DEFPROCadfs
  700PRINTSPC(8)"Insert Graphic Data Disc"''SPC(14)"Press SPACE"
  710REPEAT UNTIL INKEY(-99)
  720*ADFS
  730*MOUNT
  740ENDPROC
  750:
  760DEFPROCobject_make
  770IF mb=maxno THEN PRINT'"I am going to need more objects."
  780mb=mb+1
  790col(mb)=C
  800FOR Xwr=X-5 TO X+5
  810IF Xwr<0 OR Xwr>xax THEN NEXT:ENDPROC
  820block(mb,Xwr)=Y
  830bmin(mb,Xwr)=Y
  840NEXT
  850ENDPROC
  860:
  870DEFPROCobject_add
  880FOR Xwr=X-5 TO X+5
  890IF Xwr<0 OR Xwr>xax THEN NEXT:ENDPROC
  900block(oproc,Xwr)=Y
  910IF bmin(oproc,Xwr)=0 THEN bmin(oproc,Xwr)=Y
  920NEXT
  930ENDPROC
  940:
  950DEFPROCobject_join
  960FOR ob=1 TO mb
  970IF col(ob)=C AND block(ob,X)>=Y-5 THEN PROCadditon
  980NEXT
  990FOR ob=1 TO mb
 1000IF col(ob)=C AND ob<>oproc AND block(ob,X)>=Y-5 THEN PROCgetridofit
 1010NEXT:oproc=-1
 1020ENDPROC
 1030:
 1040DEFPROCadditon
 1050IF oproc=-1 THEN oproc=ob
 1060FOR xscan=0 TO xax-1
 1070IF block(ob,xscan)>block(oproc,xscan) THEN block(oproc,xscan)=block(ob,xscan)
 1080IF bmin(ob,xscan)<bmin(oproc,xscan) THEN bmin(oproc,xscan)=bmin(ob,xscan)
 1090NEXT
 1100ENDPROC
 1110:
 1120DEFPROCgetridofit
 1130FOR groi=ob+1 TO mb
 1140FOR groil=0 TO xax-1
 1150block(groi,groil)=block(groi-1,groil)
 1160bmin(groi,groil)=bmin(groi-1,groil)
 1170NEXT
 1180col(groi)=col(groi-1)
 1190NEXT
 1200mb=mb-1
 1210ENDPROC
 1220:
 1230DEFPROCgetdata
 1240file=OPENIN "<Obey$Dir>.Objects"
 1250INPUT#file,noobs%
 1260DIMob(noobs%+2,maxno),prob(noobs%+2,maxno),coobs(noobs%+2,maxno),name$(noobs%+2),mb(noobs%+2)
 1270FOR obget=0 TO noobs%
 1280INPUT#file,name$(obget),mb(obget)
 1290IF mb(obget)>0 THEN PROCgetdataloop
 1300CLOSE#file
 1310ENDPROC
 1320:
 1330DEFPROCgetdataloop
 1340FOR oblop=1 TO mb(obget)
 1350INPUT#file,ob(obget,oblop),coobs(obget,oblop),prob(obget,oblop)
 1360NEXT,
 1370ENDPROC
 1380:
 1390DEFPROCsaveloop
 1400FOR oblop=1 TO mb(obget)
 1410PRINT#file,ob(obget,oblop),coobs(obget,oblop),prob(obget,oblop)
 1420NEXT,
 1430ENDPROC
 1440:
 1450DEFPROCsavedata
 1460file=OPENOUT "<Obey$Dir>.Objects"
 1470PRINT#file,noobs%
 1480FOR obget=0 TO noobs%
 1490PRINT#file,name$(obget),mb(obget)
 1500IF mb(obget)>0 THEN PROCsaveloop
 1510CLOSE#file
 1520ENDPROC
 1530:
 1540DEFPROCconclusion
 1550PROCgetdata
 1560PROCcolcheck
 1570PROCiqrcheck
 1580smax=-9999999:obname$=""
 1590FOR obscan=0 TO noobs%
 1600IF mb(obscan)<>0 THEN score(obscan)=ABS(score(obscan)/mb(obscan)) ELSE score(obscan)=0
 1610IF smax<score(obscan) THEN snum=obscan:smax=score(obscan):obname$=name$(obscan)
 1620PRINTobscan,name$(obscan),score(obscan)
 1630NEXT
 1640ENDPROC
 1650:
 1660DEFPROCcolcheck
 1670DIMscore(noobs%+2)
 1680FOR picobs=1 TO mb
 1690FOR cclude=0 TO noobs%
 1700FOR obscan=1 TO mb(cclude)
 1710IF(coobs(cclude,obscan) AND 2^(col(picobs)+1))<>0 THEN score(cclude)=score(cclude)+prob(cclude,obscan)
 1720NEXT,,
 1730ENDPROC
 1740:
 1750DEFPROCiqrcheck
 1760FOR picobs=1 TO mb
 1770iqr=FNiqr(picobs)
 1780FOR cclude=0 TO noobs%
 1790FOR obscan=1 TO mb(cclude)
 1800score(cclude)=score(cclude)+(1/(prob(cclude,obscan)+.01))*ABS(iqr-ob(cclude,obscan))-0.5*prob(cclude,obscan)
 1810NEXT,,
 1820ENDPROC
 1830:
 1840DEFPROCbonds
 1850FOR cclude=1 TO mb(snum)
 1860del=FALSE
 1870REPEAT
 1880prob(snum,cclude)=prob(snum,cclude)+FNpup
 1890IF prob(snum,cclude)<=0 THEN PROCgetrid:del=TRUE
 1900UNTIL del=FALSE OR cclude=mb(snum)
 1910NEXT
 1920ENDPROC
 1930:
 1940DEFPROClearn
 1950PRINT'"Is it a ";obname$;:PROCask
 1960IF A$="N" THEN INPUT"What was it then";obnamen$:PROCrethink
 1970PRINT'"Was it a ";MCC$;" ";obname$;:PROCask
 1980IF A$="N" THEN PROCrecolour
 1990FOR cclude=1 TO mb(snum)
 2000prob(snum,cclude)=prob(snum,cclude)+0.25
 2010NEXT
 2020PROCbonds
 2030ENDPROC
 2040:
 2050DEFPROCrecolour
 2060PROCcolourtable
 2070REPEAT
 2080A$=GET$
 2090UNTIL ASC(A$)>64 AND ASC(A$)<70
 2100MCC%=ASC(A$)-64
 2110MCC$=CNA$(MCC%)
 2120ENDPROC
 2130:
 2140DEFPROCcolourtable
 2150MODE 12
 2160*<Obey$Dir>.!Pallete
 2170PRINT"What colour was it then:"
 2180FORc=0TO15
 2190COLOUR 128:PRINTCHR$(c+64);" ";
 2200COLOUR c+128
 2210PRINT;"          ";
 2220NEXT
 2230ENDPROC
 2240:
 2250DEFPROCrethink
 2260CLS
 2270PRINT"Please Wait. . ."'
 2280PROCbonds
 2290obname$=obnamen$
 2300REPEAT
 2310err=FALSE
 2320obname$=" "+obname$+" "
 2330FOR c=2 TO LEN(obname$)-1
 2340IF (FNrt<97) AND (FNrt<>32) THEN obname$=LEFT$(obname$,c-1)+CHR$(FNrt+32)+RIGHT$(obname$,LEN(obname$)-c)
 2350IF (FNrt<97 OR FNrt>122) AND FNrt<>32 THEN err=TRUE
 2360NEXT
 2370obname$=MID$(obname$,2,LEN(obname$)-2)
 2380IF err=TRUE THEN PROCreask
 2390UNTIL err=FALSE
 2400FOR ono=0 TO noobs%
 2410IF name$(ono)=obname$ THEN snum=ono:err=TRUE
 2420NEXT
 2430IF err=FALSE THEN PROCnewob
 2440ENDPROC
 2450:
 2460DEFPROCreask
 2470PRINT'"Object names can only contain letters. Please re-type the name"'
 2480INPUT"What was it then";obname$
 2490ENDPROC
 2500:
 2510DEFPROCnewob
 2520PRINT"*"
 2530noobs%=noobs%+1
 2540mb(noobs%)=mb
 2550name$(noobs%)=obname$
 2560FOR ono=1 TO mb
 2570ob(noobs%,ono)=FNiqr(ono)
 2580coobs(noobs%,ono)=cols(col(ono))
 2590prob(noobs%,ono)=2
 2600NEXT
 2610snum=noobs%
 2620ENDPROC
 2630:
 2640DEFPROCask
 2650PRINT;" (Y/N) ";
 2660REPEAT
 2670A$=GET$
 2680UNTIL INSTR("YyNn",A$)<>0
 2690IF A$="Y" OR A$="y"THEN PRINT"Yes":A$="Y" ELSE PRINT"No":A$="N"
 2700ENDPROC
 2710:
 2720DEFPROCgetrid
 2730mb(snum)=mb(snum)-1
 2740FOR obno=cclude TO mb(snum)
 2750ob(obno,snum)=ob(obno+1,snum)
 2760coobs(obno,snum)=coobs(obno+1,snum)
 2770prob(obno,snum)=prob(obno+1,snum)
 2780NEXT
 2790ENDPROC
 2800:
 2810DEFPROCstore
 2820MODE 12
 2830*<Obey$Dir>.!Pallete
 2840OSCLI"SCHOOSE "+SPR$
 2850PLOT &ED,0,0
 2860PRINT"Do you want me to learn from this sprite";:PROCask
 2870IF A$="N" THEN ENDPROC
 2880PRINT"Please wait. . .";
 2890PROCsavedata
 2900ENDPROC
 2910:
 2920DEFPROCmenubar(options)
 2930CLS
 2940PRINTtitle$'
 2950FOR o=1 TO options
 2960PRINT" ";o$(o)
 2970NEXT
 2980o=1:old=-1
 2990REPEAT
 3000PROCinvert
 3010A$=GET$
 3020IF A$="/" AND o<>options THEN o=o+1
 3030IF A$="'" AND o<>1 THEN o=o-1
 3040UNTIL A$=CHR$(13)
 3050PRINTTAB(0,options+2);
 3060ENDPROC
 3070:
 3080DEFPROCinvert
 3090IF old<>-1 THEN PRINTTAB(0,old+1);" "
 3100PRINTTAB(0,o+1);">"
 3110old=o
 3120ENDPROC
 3130:
 3140DEFFNiqr(ono)
 3150dva=0
 3160FOR xt=0 TO xax-1
 3170IF block(ono,xt)>bmin(ono,xt) THEN PROCaddiqr:dva=dva+1
 3180NEXT
 3190=iw(INT(dva*.75))/iw(INT(dva*.25))
 3200:
 3210DEFPROCaddiqr
 3220FOR xs=0 TO dva
 3230IF FNdif>=iw(xs) THEN pos=xs
 3240NEXT
 3250FOR s=pos+1 TO dva
 3260iw(xs-1)=iw(xs)
 3270NEXT
 3280iw(pos)=FNdif
 3290ENDPROC
 3300:
 3310DEFFNdif=block(ono,xt)-bmin(ono,xt)
 3320:
 3330DEFFNpup
 3340xt=0
 3350ono=cclude
 3360iqr=FNiqr(ono)
 3370IF iqr<=ob(snum,cclude) THEN xt=(iqr/ob(snum,cclude))*1.5
 3380IF iqr>ob(snum,cclude) THEN xt=(ob(snum,cclude)/iqr)*1.5
 3390IF (2^(col(ono)+1) AND coobs(snum,cclude)) THEN xt=xt+.25
 3400IF col(ono)=MCC% THEN xt=xt+.25
 3410=xt
 3420:
 3430DEFFNrt=ASC(MID$(obname$,c,1))
 3440:
 3450DEFFNpera=INT((100/(xax*yax))*((X-1)+(Y-1)*xax))
 3460:
 3470DATA "white",3,"light grey",7,"medium grey",14,"dark grey",28,"very dark grey",240
 3480DATA "extremely dark grey",240,"light black",240,"black",240
 3490DATA "dark blue",8448,"yellow",4608,"green",1024,"red",18432
 3500DATA "light yellow",4608,"dark green",8448
 3510DATA "orange",16384,"light blue",32768

&� SpriteTest - Interquartile range
 � By Dominic Ford - May 1995
:
(� 7
2	�init
<�analyse
F�conclusion
P
�learn
Z
�store
d� 0
n�
x:
�
��analyse
�� Y=1 � yax
�� X=1 � xax
��3,3);�pera;"%"
�0ș "OS_SpriteOp",41,,SPR$,X-1,Y-1 � ,,,,,C,T
�	bin=0
�c(C)=c(C)+1
�� bo=1 � mb
�B� col(bo)=C � block(bo,X)>Y-6 � bin=bin+1:oproc=bo:�object_add
��
�� bin=0 � �object_make
�� bin>1 � �object_join
��,
�mcc
�
:
"	��mcc
,	CM%=0
6� C=1 � 15
@.� c(C)>=CM% � CM%=c(C):MCC$=CNA$(C):MCC%=C
J�
T�
^:
h
��init
r
�o$(7)
|� � � 0:�:�" at line ";�:�
�%ș "OS_ChangeDynamicArea",3,&8000
�5�(129);�(141);�(3)"Sprite Recognition by D Ford"
�5�(129);�(141);�(3)"Sprite Recognition by D Ford"
�� 28,0,24,39,3,135
�ptitle$="FILING SYSTEM SELECTION":o$(1)="(R)am":o$(2)="(A)DFS":o$(3)="(S)erver":o$(4)="(C)urrent":�menubar(4)
�� o=3 � �server
�� o=2 � �adfs
�� o=1 � *RAM
��
�*.
��"Sprite file name";SFILE$
��"     Sprite name";SPR$
�maxno=50
�
�'"Please Wait. . ."
� "SLOAD "+SFILE$
&2ș "OS_SpriteOp",40,,SPR$ � ,,,xax,yax,H,,MDOE
0B�block(maxno,xax),col(maxno),bmin(maxno,xax),CNA$(15),cols(15)
:*�c(15),MCC$(15),MCC(15),CM(15),iw(xax)
Dmb=0
N� C=0 � 15
X� CNA$(C),cols(C)
b�
l�
v:
���server
��"     Server name";NAME$
��"I AM "+NAME$
��
�:
�
��adfs
�7�(8)"Insert Graphic Data Disc"''�(14)"Press SPACE"
�� � �(-99)
�	*ADFS
�
*MOUNT
��
�:
���object_make
5� mb=maxno � �'"I am going to need more objects."
mb=mb+1

col(mb)=C
 � Xwr=X-5 � X+5
*� Xwr<0 � Xwr>xax � �:�
4block(mb,Xwr)=Y
>bmin(mb,Xwr)=Y
H�
R�
\:
f��object_add
p� Xwr=X-5 � X+5
z� Xwr<0 � Xwr>xax � �:�
�block(oproc,Xwr)=Y
�+� bmin(oproc,Xwr)=0 � bmin(oproc,Xwr)=Y
��
��
�:
���object_join
�� ob=1 � mb
�-� col(ob)=C � block(ob,X)>=Y-5 � �additon
��
�� ob=1 � mb
�<� col(ob)=C � ob<>oproc � block(ob,X)>=Y-5 � �getridofit
��:oproc=-1
��
:

��additon
� oproc=-1 � oproc=ob
$� xscan=0 � xax-1
.M� block(ob,xscan)>block(oproc,xscan) � block(oproc,xscan)=block(ob,xscan)
8I� bmin(ob,xscan)<bmin(oproc,xscan) � bmin(oproc,xscan)=bmin(ob,xscan)
B�
L�
V:
`��getridofit
j� groi=ob+1 � mb
t� groil=0 � xax-1
~)block(groi,groil)=block(groi-1,groil)
�'bmin(groi,groil)=bmin(groi-1,groil)
��
�col(groi)=col(groi-1)
��
�mb=mb-1
��
�:
�
��getdata
�file=� "<Obey$Dir>.Objects"
��#file,noobs%
�_�ob(noobs%+2,maxno),prob(noobs%+2,maxno),coobs(noobs%+2,maxno),name$(noobs%+2),mb(noobs%+2)
�� obget=0 � noobs%
!�#file,name$(obget),mb(obget)

 � mb(obget)>0 � �getdataloop

�#file
�
(:
2��getdataloop
<� oblop=1 � mb(obget)
F?�#file,ob(obget,oblop),coobs(obget,oblop),prob(obget,oblop)
P�,
Z�
d:
n��saveloop
x� oblop=1 � mb(obget)
�?�#file,ob(obget,oblop),coobs(obget,oblop),prob(obget,oblop)
��,
��
�:
���savedata
�file=� "<Obey$Dir>.Objects"
��#file,noobs%
�� obget=0 � noobs%
�!�#file,name$(obget),mb(obget)
�� mb(obget)>0 � �saveloop
�
�#file
��
�:
��conclusion
�getdata

�colcheck
"
�iqrcheck
,smax=-9999999:obname$=""
6� obscan=0 � noobs%
@Q� mb(obscan)<>0 � score(obscan)=�(score(obscan)/mb(obscan)) � score(obscan)=0
JO� smax<score(obscan) � snum=obscan:smax=score(obscan):obname$=name$(obscan)
T'�obscan,name$(obscan),score(obscan)
^�
h�
r:
|��colcheck
��score(noobs%+2)
�� picobs=1 � mb
�� cclude=0 � noobs%
�� obscan=1 � mb(cclude)
�d�(coobs(cclude,obscan) � 2^(col(picobs)+1))<>0 � score(cclude)=score(cclude)+prob(cclude,obscan)
��,,
��
�:
���iqrcheck
�� picobs=1 � mb
�iqr=�iqr(picobs)
�� cclude=0 � noobs%
�� obscan=1 � mb(cclude)
nscore(cclude)=score(cclude)+(1/(prob(cclude,obscan)+.01))*�(iqr-ob(cclude,obscan))-0.5*prob(cclude,obscan)
�,,
�
&:
0��bonds
:� cclude=1 � mb(snum)
D	del=�
N�
X,prob(snum,cclude)=prob(snum,cclude)+�pup
b*� prob(snum,cclude)<=0 � �getrid:del=�
l� del=� � cclude=mb(snum)
v�
��
�:
���learn
��'"Is it a ";obname$;:�ask
�4� A$="N" � �"What was it then";obnamen$:�rethink
�(�'"Was it a ";MCC$;" ";obname$;:�ask
�� A$="N" � �recolour
�� cclude=1 � mb(snum)
�,prob(snum,cclude)=prob(snum,cclude)+0.25
��
�
�bonds
��
�:
��recolour
�colourtable
�
 A$=�
*� �(A$)>64 � �(A$)<70
4MCC%=�(A$)-64
>MCC$=CNA$(MCC%)
H�
R:
\��colourtable
f� 12
p*<Obey$Dir>.!Pallete
z�"What colour was it then:"
��c=0�15
�� 128:�(c+64);" ";
�� c+128
��;"          ";
��
��
�:
�
��rethink
��
��"Please Wait. . ."'
�
�bonds
�obname$=obnamen$
��
		err=�
	obname$=" "+obname$+" "
	� c=2 � �(obname$)-1
	$S� (�rt<97) � (�rt<>32) � obname$=�obname$,c-1)+�(�rt+32)+�obname$,�(obname$)-c)
	.*� (�rt<97 � �rt>122) � �rt<>32 � err=�
	8�
	B$obname$=�obname$,2,�(obname$)-2)
	L� err=� � �reask
	V� err=�
	`� ono=0 � noobs%
	j)� name$(ono)=obname$ � snum=ono:err=�
	t�
	~� err=� � �newob
	��
	�:
	���reask
	�G�'"Object names can only contain letters. Please re-type the name"'
	��"What was it then";obname$
	��
	�:
	���newob
	��"*"
	�noobs%=noobs%+1
	�mb(noobs%)=mb
	�name$(noobs%)=obname$
� ono=1 � mb

ob(noobs%,ono)=�iqr(ono)
$coobs(noobs%,ono)=cols(col(ono))
prob(noobs%,ono)=2
(�
2snum=noobs%
<�
F:
P	��ask
Z�;" (Y/N) ";
d�
nA$=�
x� �"YyNn",A$)<>0
�3� A$="Y" � A$="y"� �"Yes":A$="Y" � �"No":A$="N"
��
�:
���getrid
�mb(snum)=mb(snum)-1
�� obno=cclude � mb(snum)
�!ob(obno,snum)=ob(obno+1,snum)
�'coobs(obno,snum)=coobs(obno+1,snum)
�%prob(obno,snum)=prob(obno+1,snum)
��
��
�:
���store
� 12
*<Obey$Dir>.!Pallete
�"SCHOOSE "+SPR$
"
� &ED,0,0
,5�"Do you want me to learn from this sprite";:�ask
6� A$="N" � �
@�"Please wait. . .";
J
�savedata
T�
^:
h��menubar(options)
r�
|�title$'
�� o=1 � options
��" ";o$(o)
��
�o=1:old=-1
��
��invert
�A$=�
�!� A$="/" � o<>options � o=o+1
�� A$="'" � o<>1 � o=o-1
�� A$=�(13)
��0,options+2);
��
�:
��invert
� old<>-1 � �0,old+1);" "
�0,o+1);">"
&	old=o
0�
::
Dݤiqr(ono)
N	dva=0
X� xt=0 � xax-1
b4� block(ono,xt)>bmin(ono,xt) � �addiqr:dva=dva+1
l�
v"=iw(�(dva*.75))/iw(�(dva*.25))
�:
���addiqr
�� xs=0 � dva
�� �dif>=iw(xs) � pos=xs
��
�� s=pos+1 � dva
�iw(xs-1)=iw(xs)
��
�iw(pos)=�dif
��
�:
�$ݤdif=block(ono,xt)-bmin(ono,xt)
�:

	ݤpup

xt=0

ono=cclude

 iqr=�iqr(ono)

*9� iqr<=ob(snum,cclude) � xt=(iqr/ob(snum,cclude))*1.5

48� iqr>ob(snum,cclude) � xt=(ob(snum,cclude)/iqr)*1.5

>7� (2^(col(ono)+1) � coobs(snum,cclude)) � xt=xt+.25

H� col(ono)=MCC% � xt=xt+.25

R=xt

\:

fݤrt=�(�obname$,c,1))

p:

z/ݤpera=�((100/(xax*yax))*((X-1)+(Y-1)*xax))

�:

�S� "white",3,"light grey",7,"medium grey",14,"dark grey",28,"very dark grey",240

�=� "extremely dark grey",240,"light black",240,"black",240

�=� "dark blue",8448,"yellow",4608,"green",1024,"red",18432

�+� "light yellow",4608,"dark green",8448

�'� "orange",16384,"light blue",32768
�
00000000  0d 00 0a 26 f4 20 53 70  72 69 74 65 54 65 73 74  |...&. SpriteTest|
00000010  20 2d 20 49 6e 74 65 72  71 75 61 72 74 69 6c 65  | - Interquartile|
00000020  20 72 61 6e 67 65 0d 00  14 20 f4 20 42 79 20 44  | range... . By D|
00000030  6f 6d 69 6e 69 63 20 46  6f 72 64 20 2d 20 4d 61  |ominic Ford - Ma|
00000040  79 20 31 39 39 35 0d 00  1e 05 3a 0d 00 28 07 eb  |y 1995....:..(..|
00000050  20 37 0d 00 32 09 f2 69  6e 69 74 0d 00 3c 0c f2  | 7..2..init..<..|
00000060  61 6e 61 6c 79 73 65 0d  00 46 0f f2 63 6f 6e 63  |analyse..F..conc|
00000070  6c 75 73 69 6f 6e 0d 00  50 0a f2 6c 65 61 72 6e  |lusion..P..learn|
00000080  0d 00 5a 0a f2 73 74 6f  72 65 0d 00 64 07 eb 20  |..Z..store..d.. |
00000090  30 0d 00 6e 05 e0 0d 00  78 05 3a 0d 00 82 0d dd  |0..n....x.:.....|
000000a0  f2 61 6e 61 6c 79 73 65  0d 00 8c 0f e3 20 59 3d  |.analyse..... Y=|
000000b0  31 20 b8 20 79 61 78 0d  00 96 0f e3 20 58 3d 31  |1 . yax..... X=1|
000000c0  20 b8 20 78 61 78 0d 00  a0 14 f1 8a 33 2c 33 29  | . xax......3,3)|
000000d0  3b a4 70 65 72 61 3b 22  25 22 0d 00 aa 30 c8 99  |;.pera;"%"...0..|
000000e0  20 22 4f 53 5f 53 70 72  69 74 65 4f 70 22 2c 34  | "OS_SpriteOp",4|
000000f0  31 2c 2c 53 50 52 24 2c  58 2d 31 2c 59 2d 31 20  |1,,SPR$,X-1,Y-1 |
00000100  b8 20 2c 2c 2c 2c 2c 43  2c 54 0d 00 b4 09 62 69  |. ,,,,,C,T....bi|
00000110  6e 3d 30 0d 00 be 0f 63  28 43 29 3d 63 28 43 29  |n=0....c(C)=c(C)|
00000120  2b 31 0d 00 c8 0f e3 20  62 6f 3d 31 20 b8 20 6d  |+1..... bo=1 . m|
00000130  62 0d 00 d2 42 e7 20 63  6f 6c 28 62 6f 29 3d 43  |b...B. col(bo)=C|
00000140  20 80 20 62 6c 6f 63 6b  28 62 6f 2c 58 29 3e 59  | . block(bo,X)>Y|
00000150  2d 36 20 8c 20 62 69 6e  3d 62 69 6e 2b 31 3a 6f  |-6 . bin=bin+1:o|
00000160  70 72 6f 63 3d 62 6f 3a  f2 6f 62 6a 65 63 74 5f  |proc=bo:.object_|
00000170  61 64 64 0d 00 dc 05 ed  0d 00 e6 1a e7 20 62 69  |add.......... bi|
00000180  6e 3d 30 20 8c 20 f2 6f  62 6a 65 63 74 5f 6d 61  |n=0 . .object_ma|
00000190  6b 65 0d 00 f0 1a e7 20  62 69 6e 3e 31 20 8c 20  |ke..... bin>1 . |
000001a0  f2 6f 62 6a 65 63 74 5f  6a 6f 69 6e 0d 00 fa 06  |.object_join....|
000001b0  ed 2c 0d 01 04 08 f2 6d  63 63 0d 01 0e 05 e1 0d  |.,.....mcc......|
000001c0  01 18 05 3a 0d 01 22 09  dd f2 6d 63 63 0d 01 2c  |...:.."...mcc..,|
000001d0  09 43 4d 25 3d 30 0d 01  36 0e e3 20 43 3d 31 20  |.CM%=0..6.. C=1 |
000001e0  b8 20 31 35 0d 01 40 2e  e7 20 63 28 43 29 3e 3d  |. 15..@.. c(C)>=|
000001f0  43 4d 25 20 8c 20 43 4d  25 3d 63 28 43 29 3a 4d  |CM% . CM%=c(C):M|
00000200  43 43 24 3d 43 4e 41 24  28 43 29 3a 4d 43 43 25  |CC$=CNA$(C):MCC%|
00000210  3d 43 0d 01 4a 05 ed 0d  01 54 05 e1 0d 01 5e 05  |=C..J....T....^.|
00000220  3a 0d 01 68 0a dd f2 69  6e 69 74 0d 01 72 0a de  |:..h...init..r..|
00000230  6f 24 28 37 29 0d 01 7c  1e ee 20 85 20 eb 20 30  |o$(7)..|.. . . 0|
00000240  3a f6 3a f1 22 20 61 74  20 6c 69 6e 65 20 22 3b  |:.:." at line ";|
00000250  9e 3a e0 0d 01 86 25 c8  99 20 22 4f 53 5f 43 68  |.:....%.. "OS_Ch|
00000260  61 6e 67 65 44 79 6e 61  6d 69 63 41 72 65 61 22  |angeDynamicArea"|
00000270  2c 33 2c 26 38 30 30 30  0d 01 90 35 f1 bd 28 31  |,3,&8000...5..(1|
00000280  32 39 29 3b bd 28 31 34  31 29 3b 89 28 33 29 22  |29);.(141);.(3)"|
00000290  53 70 72 69 74 65 20 52  65 63 6f 67 6e 69 74 69  |Sprite Recogniti|
000002a0  6f 6e 20 62 79 20 44 20  46 6f 72 64 22 0d 01 9a  |on by D Ford"...|
000002b0  35 f1 bd 28 31 32 39 29  3b bd 28 31 34 31 29 3b  |5..(129);.(141);|
000002c0  89 28 33 29 22 53 70 72  69 74 65 20 52 65 63 6f  |.(3)"Sprite Reco|
000002d0  67 6e 69 74 69 6f 6e 20  62 79 20 44 20 46 6f 72  |gnition by D For|
000002e0  64 22 0d 01 a4 16 ef 20  32 38 2c 30 2c 32 34 2c  |d"..... 28,0,24,|
000002f0  33 39 2c 33 2c 31 33 35  0d 01 ae 70 74 69 74 6c  |39,3,135...ptitl|
00000300  65 24 3d 22 46 49 4c 49  4e 47 20 53 59 53 54 45  |e$="FILING SYSTE|
00000310  4d 20 53 45 4c 45 43 54  49 4f 4e 22 3a 6f 24 28  |M SELECTION":o$(|
00000320  31 29 3d 22 28 52 29 61  6d 22 3a 6f 24 28 32 29  |1)="(R)am":o$(2)|
00000330  3d 22 28 41 29 44 46 53  22 3a 6f 24 28 33 29 3d  |="(A)DFS":o$(3)=|
00000340  22 28 53 29 65 72 76 65  72 22 3a 6f 24 28 34 29  |"(S)erver":o$(4)|
00000350  3d 22 28 43 29 75 72 72  65 6e 74 22 3a f2 6d 65  |="(C)urrent":.me|
00000360  6e 75 62 61 72 28 34 29  0d 01 b8 13 e7 20 6f 3d  |nubar(4)..... o=|
00000370  33 20 8c 20 f2 73 65 72  76 65 72 0d 01 c2 11 e7  |3 . .server.....|
00000380  20 6f 3d 32 20 8c 20 f2  61 64 66 73 0d 01 cc 10  | o=2 . .adfs....|
00000390  e7 20 6f 3d 31 20 8c 20  2a 52 41 4d 0d 01 d6 05  |. o=1 . *RAM....|
000003a0  db 0d 01 e0 06 2a 2e 0d  01 ea 1e e8 22 53 70 72  |.....*......"Spr|
000003b0  69 74 65 20 66 69 6c 65  20 6e 61 6d 65 22 3b 53  |ite file name";S|
000003c0  46 49 4c 45 24 0d 01 f4  1c e8 22 20 20 20 20 20  |FILE$....."     |
000003d0  53 70 72 69 74 65 20 6e  61 6d 65 22 3b 53 50 52  |Sprite name";SPR|
000003e0  24 0d 01 fe 0c 6d 61 78  6e 6f 3d 35 30 0d 02 08  |$....maxno=50...|
000003f0  05 db 0d 02 12 18 f1 27  22 50 6c 65 61 73 65 20  |.......'"Please |
00000400  57 61 69 74 2e 20 2e 20  2e 22 0d 02 1c 15 ff 20  |Wait. . ."..... |
00000410  22 53 4c 4f 41 44 20 22  2b 53 46 49 4c 45 24 0d  |"SLOAD "+SFILE$.|
00000420  02 26 32 c8 99 20 22 4f  53 5f 53 70 72 69 74 65  |.&2.. "OS_Sprite|
00000430  4f 70 22 2c 34 30 2c 2c  53 50 52 24 20 b8 20 2c  |Op",40,,SPR$ . ,|
00000440  2c 2c 78 61 78 2c 79 61  78 2c 48 2c 2c 4d 44 4f  |,,xax,yax,H,,MDO|
00000450  45 0d 02 30 42 de 62 6c  6f 63 6b 28 6d 61 78 6e  |E..0B.block(maxn|
00000460  6f 2c 78 61 78 29 2c 63  6f 6c 28 6d 61 78 6e 6f  |o,xax),col(maxno|
00000470  29 2c 62 6d 69 6e 28 6d  61 78 6e 6f 2c 78 61 78  |),bmin(maxno,xax|
00000480  29 2c 43 4e 41 24 28 31  35 29 2c 63 6f 6c 73 28  |),CNA$(15),cols(|
00000490  31 35 29 0d 02 3a 2a de  63 28 31 35 29 2c 4d 43  |15)..:*.c(15),MC|
000004a0  43 24 28 31 35 29 2c 4d  43 43 28 31 35 29 2c 43  |C$(15),MCC(15),C|
000004b0  4d 28 31 35 29 2c 69 77  28 78 61 78 29 0d 02 44  |M(15),iw(xax)..D|
000004c0  08 6d 62 3d 30 0d 02 4e  0e e3 20 43 3d 30 20 b8  |.mb=0..N.. C=0 .|
000004d0  20 31 35 0d 02 58 15 f3  20 43 4e 41 24 28 43 29  | 15..X.. CNA$(C)|
000004e0  2c 63 6f 6c 73 28 43 29  0d 02 62 05 ed 0d 02 6c  |,cols(C)..b....l|
000004f0  05 e1 0d 02 76 05 3a 0d  02 80 0c dd f2 73 65 72  |....v.:......ser|
00000500  76 65 72 0d 02 8a 1d e8  22 20 20 20 20 20 53 65  |ver....."     Se|
00000510  72 76 65 72 20 6e 61 6d  65 22 3b 4e 41 4d 45 24  |rver name";NAME$|
00000520  0d 02 94 12 ff 22 49 20  41 4d 20 22 2b 4e 41 4d  |....."I AM "+NAM|
00000530  45 24 0d 02 9e 05 e1 0d  02 a8 05 3a 0d 02 b2 0a  |E$.........:....|
00000540  dd f2 61 64 66 73 0d 02  bc 37 f1 89 28 38 29 22  |..adfs...7..(8)"|
00000550  49 6e 73 65 72 74 20 47  72 61 70 68 69 63 20 44  |Insert Graphic D|
00000560  61 74 61 20 44 69 73 63  22 27 27 89 28 31 34 29  |ata Disc"''.(14)|
00000570  22 50 72 65 73 73 20 53  50 41 43 45 22 0d 02 c6  |"Press SPACE"...|
00000580  0e f5 20 fd 20 a6 28 2d  39 39 29 0d 02 d0 09 2a  |.. . .(-99)....*|
00000590  41 44 46 53 0d 02 da 0a  2a 4d 4f 55 4e 54 0d 02  |ADFS....*MOUNT..|
000005a0  e4 05 e1 0d 02 ee 05 3a  0d 02 f8 11 dd f2 6f 62  |.......:......ob|
000005b0  6a 65 63 74 5f 6d 61 6b  65 0d 03 02 35 e7 20 6d  |ject_make...5. m|
000005c0  62 3d 6d 61 78 6e 6f 20  8c 20 f1 27 22 49 20 61  |b=maxno . .'"I a|
000005d0  6d 20 67 6f 69 6e 67 20  74 6f 20 6e 65 65 64 20  |m going to need |
000005e0  6d 6f 72 65 20 6f 62 6a  65 63 74 73 2e 22 0d 03  |more objects."..|
000005f0  0c 0b 6d 62 3d 6d 62 2b  31 0d 03 16 0d 63 6f 6c  |..mb=mb+1....col|
00000600  28 6d 62 29 3d 43 0d 03  20 13 e3 20 58 77 72 3d  |(mb)=C.. .. Xwr=|
00000610  58 2d 35 20 b8 20 58 2b  35 0d 03 2a 1b e7 20 58  |X-5 . X+5..*.. X|
00000620  77 72 3c 30 20 84 20 58  77 72 3e 78 61 78 20 8c  |wr<0 . Xwr>xax .|
00000630  20 ed 3a e1 0d 03 34 13  62 6c 6f 63 6b 28 6d 62  | .:...4.block(mb|
00000640  2c 58 77 72 29 3d 59 0d  03 3e 12 62 6d 69 6e 28  |,Xwr)=Y..>.bmin(|
00000650  6d 62 2c 58 77 72 29 3d  59 0d 03 48 05 ed 0d 03  |mb,Xwr)=Y..H....|
00000660  52 05 e1 0d 03 5c 05 3a  0d 03 66 10 dd f2 6f 62  |R....\.:..f...ob|
00000670  6a 65 63 74 5f 61 64 64  0d 03 70 13 e3 20 58 77  |ject_add..p.. Xw|
00000680  72 3d 58 2d 35 20 b8 20  58 2b 35 0d 03 7a 1b e7  |r=X-5 . X+5..z..|
00000690  20 58 77 72 3c 30 20 84  20 58 77 72 3e 78 61 78  | Xwr<0 . Xwr>xax|
000006a0  20 8c 20 ed 3a e1 0d 03  84 16 62 6c 6f 63 6b 28  | . .:.....block(|
000006b0  6f 70 72 6f 63 2c 58 77  72 29 3d 59 0d 03 8e 2b  |oproc,Xwr)=Y...+|
000006c0  e7 20 62 6d 69 6e 28 6f  70 72 6f 63 2c 58 77 72  |. bmin(oproc,Xwr|
000006d0  29 3d 30 20 8c 20 62 6d  69 6e 28 6f 70 72 6f 63  |)=0 . bmin(oproc|
000006e0  2c 58 77 72 29 3d 59 0d  03 98 05 ed 0d 03 a2 05  |,Xwr)=Y.........|
000006f0  e1 0d 03 ac 05 3a 0d 03  b6 11 dd f2 6f 62 6a 65  |.....:......obje|
00000700  63 74 5f 6a 6f 69 6e 0d  03 c0 0f e3 20 6f 62 3d  |ct_join..... ob=|
00000710  31 20 b8 20 6d 62 0d 03  ca 2d e7 20 63 6f 6c 28  |1 . mb...-. col(|
00000720  6f 62 29 3d 43 20 80 20  62 6c 6f 63 6b 28 6f 62  |ob)=C . block(ob|
00000730  2c 58 29 3e 3d 59 2d 35  20 8c 20 f2 61 64 64 69  |,X)>=Y-5 . .addi|
00000740  74 6f 6e 0d 03 d4 05 ed  0d 03 de 0f e3 20 6f 62  |ton.......... ob|
00000750  3d 31 20 b8 20 6d 62 0d  03 e8 3c e7 20 63 6f 6c  |=1 . mb...<. col|
00000760  28 6f 62 29 3d 43 20 80  20 6f 62 3c 3e 6f 70 72  |(ob)=C . ob<>opr|
00000770  6f 63 20 80 20 62 6c 6f  63 6b 28 6f 62 2c 58 29  |oc . block(ob,X)|
00000780  3e 3d 59 2d 35 20 8c 20  f2 67 65 74 72 69 64 6f  |>=Y-5 . .getrido|
00000790  66 69 74 0d 03 f2 0e ed  3a 6f 70 72 6f 63 3d 2d  |fit.....:oproc=-|
000007a0  31 0d 03 fc 05 e1 0d 04  06 05 3a 0d 04 10 0d dd  |1.........:.....|
000007b0  f2 61 64 64 69 74 6f 6e  0d 04 1a 19 e7 20 6f 70  |.additon..... op|
000007c0  72 6f 63 3d 2d 31 20 8c  20 6f 70 72 6f 63 3d 6f  |roc=-1 . oproc=o|
000007d0  62 0d 04 24 15 e3 20 78  73 63 61 6e 3d 30 20 b8  |b..$.. xscan=0 .|
000007e0  20 78 61 78 2d 31 0d 04  2e 4d e7 20 62 6c 6f 63  | xax-1...M. bloc|
000007f0  6b 28 6f 62 2c 78 73 63  61 6e 29 3e 62 6c 6f 63  |k(ob,xscan)>bloc|
00000800  6b 28 6f 70 72 6f 63 2c  78 73 63 61 6e 29 20 8c  |k(oproc,xscan) .|
00000810  20 62 6c 6f 63 6b 28 6f  70 72 6f 63 2c 78 73 63  | block(oproc,xsc|
00000820  61 6e 29 3d 62 6c 6f 63  6b 28 6f 62 2c 78 73 63  |an)=block(ob,xsc|
00000830  61 6e 29 0d 04 38 49 e7  20 62 6d 69 6e 28 6f 62  |an)..8I. bmin(ob|
00000840  2c 78 73 63 61 6e 29 3c  62 6d 69 6e 28 6f 70 72  |,xscan)<bmin(opr|
00000850  6f 63 2c 78 73 63 61 6e  29 20 8c 20 62 6d 69 6e  |oc,xscan) . bmin|
00000860  28 6f 70 72 6f 63 2c 78  73 63 61 6e 29 3d 62 6d  |(oproc,xscan)=bm|
00000870  69 6e 28 6f 62 2c 78 73  63 61 6e 29 0d 04 42 05  |in(ob,xscan)..B.|
00000880  ed 0d 04 4c 05 e1 0d 04  56 05 3a 0d 04 60 10 dd  |...L....V.:..`..|
00000890  f2 67 65 74 72 69 64 6f  66 69 74 0d 04 6a 14 e3  |.getridofit..j..|
000008a0  20 67 72 6f 69 3d 6f 62  2b 31 20 b8 20 6d 62 0d  | groi=ob+1 . mb.|
000008b0  04 74 15 e3 20 67 72 6f  69 6c 3d 30 20 b8 20 78  |.t.. groil=0 . x|
000008c0  61 78 2d 31 0d 04 7e 29  62 6c 6f 63 6b 28 67 72  |ax-1..~)block(gr|
000008d0  6f 69 2c 67 72 6f 69 6c  29 3d 62 6c 6f 63 6b 28  |oi,groil)=block(|
000008e0  67 72 6f 69 2d 31 2c 67  72 6f 69 6c 29 0d 04 88  |groi-1,groil)...|
000008f0  27 62 6d 69 6e 28 67 72  6f 69 2c 67 72 6f 69 6c  |'bmin(groi,groil|
00000900  29 3d 62 6d 69 6e 28 67  72 6f 69 2d 31 2c 67 72  |)=bmin(groi-1,gr|
00000910  6f 69 6c 29 0d 04 92 05  ed 0d 04 9c 19 63 6f 6c  |oil).........col|
00000920  28 67 72 6f 69 29 3d 63  6f 6c 28 67 72 6f 69 2d  |(groi)=col(groi-|
00000930  31 29 0d 04 a6 05 ed 0d  04 b0 0b 6d 62 3d 6d 62  |1).........mb=mb|
00000940  2d 31 0d 04 ba 05 e1 0d  04 c4 05 3a 0d 04 ce 0d  |-1.........:....|
00000950  dd f2 67 65 74 64 61 74  61 0d 04 d8 1f 66 69 6c  |..getdata....fil|
00000960  65 3d 8e 20 22 3c 4f 62  65 79 24 44 69 72 3e 2e  |e=. "<Obey$Dir>.|
00000970  4f 62 6a 65 63 74 73 22  0d 04 e2 11 e8 23 66 69  |Objects".....#fi|
00000980  6c 65 2c 6e 6f 6f 62 73  25 0d 04 ec 5f de 6f 62  |le,noobs%..._.ob|
00000990  28 6e 6f 6f 62 73 25 2b  32 2c 6d 61 78 6e 6f 29  |(noobs%+2,maxno)|
000009a0  2c 70 72 6f 62 28 6e 6f  6f 62 73 25 2b 32 2c 6d  |,prob(noobs%+2,m|
000009b0  61 78 6e 6f 29 2c 63 6f  6f 62 73 28 6e 6f 6f 62  |axno),coobs(noob|
000009c0  73 25 2b 32 2c 6d 61 78  6e 6f 29 2c 6e 61 6d 65  |s%+2,maxno),name|
000009d0  24 28 6e 6f 6f 62 73 25  2b 32 29 2c 6d 62 28 6e  |$(noobs%+2),mb(n|
000009e0  6f 6f 62 73 25 2b 32 29  0d 04 f6 16 e3 20 6f 62  |oobs%+2)..... ob|
000009f0  67 65 74 3d 30 20 b8 20  6e 6f 6f 62 73 25 0d 05  |get=0 . noobs%..|
00000a00  00 21 e8 23 66 69 6c 65  2c 6e 61 6d 65 24 28 6f  |.!.#file,name$(o|
00000a10  62 67 65 74 29 2c 6d 62  28 6f 62 67 65 74 29 0d  |bget),mb(obget).|
00000a20  05 0a 20 e7 20 6d 62 28  6f 62 67 65 74 29 3e 30  |.. . mb(obget)>0|
00000a30  20 8c 20 f2 67 65 74 64  61 74 61 6c 6f 6f 70 0d  | . .getdataloop.|
00000a40  05 14 0a d9 23 66 69 6c  65 0d 05 1e 05 e1 0d 05  |....#file.......|
00000a50  28 05 3a 0d 05 32 11 dd  f2 67 65 74 64 61 74 61  |(.:..2...getdata|
00000a60  6c 6f 6f 70 0d 05 3c 19  e3 20 6f 62 6c 6f 70 3d  |loop..<.. oblop=|
00000a70  31 20 b8 20 6d 62 28 6f  62 67 65 74 29 0d 05 46  |1 . mb(obget)..F|
00000a80  3f e8 23 66 69 6c 65 2c  6f 62 28 6f 62 67 65 74  |?.#file,ob(obget|
00000a90  2c 6f 62 6c 6f 70 29 2c  63 6f 6f 62 73 28 6f 62  |,oblop),coobs(ob|
00000aa0  67 65 74 2c 6f 62 6c 6f  70 29 2c 70 72 6f 62 28  |get,oblop),prob(|
00000ab0  6f 62 67 65 74 2c 6f 62  6c 6f 70 29 0d 05 50 06  |obget,oblop)..P.|
00000ac0  ed 2c 0d 05 5a 05 e1 0d  05 64 05 3a 0d 05 6e 0e  |.,..Z....d.:..n.|
00000ad0  dd f2 73 61 76 65 6c 6f  6f 70 0d 05 78 19 e3 20  |..saveloop..x.. |
00000ae0  6f 62 6c 6f 70 3d 31 20  b8 20 6d 62 28 6f 62 67  |oblop=1 . mb(obg|
00000af0  65 74 29 0d 05 82 3f f1  23 66 69 6c 65 2c 6f 62  |et)...?.#file,ob|
00000b00  28 6f 62 67 65 74 2c 6f  62 6c 6f 70 29 2c 63 6f  |(obget,oblop),co|
00000b10  6f 62 73 28 6f 62 67 65  74 2c 6f 62 6c 6f 70 29  |obs(obget,oblop)|
00000b20  2c 70 72 6f 62 28 6f 62  67 65 74 2c 6f 62 6c 6f  |,prob(obget,oblo|
00000b30  70 29 0d 05 8c 06 ed 2c  0d 05 96 05 e1 0d 05 a0  |p).....,........|
00000b40  05 3a 0d 05 aa 0e dd f2  73 61 76 65 64 61 74 61  |.:......savedata|
00000b50  0d 05 b4 1f 66 69 6c 65  3d ae 20 22 3c 4f 62 65  |....file=. "<Obe|
00000b60  79 24 44 69 72 3e 2e 4f  62 6a 65 63 74 73 22 0d  |y$Dir>.Objects".|
00000b70  05 be 11 f1 23 66 69 6c  65 2c 6e 6f 6f 62 73 25  |....#file,noobs%|
00000b80  0d 05 c8 16 e3 20 6f 62  67 65 74 3d 30 20 b8 20  |..... obget=0 . |
00000b90  6e 6f 6f 62 73 25 0d 05  d2 21 f1 23 66 69 6c 65  |noobs%...!.#file|
00000ba0  2c 6e 61 6d 65 24 28 6f  62 67 65 74 29 2c 6d 62  |,name$(obget),mb|
00000bb0  28 6f 62 67 65 74 29 0d  05 dc 1d e7 20 6d 62 28  |(obget)..... mb(|
00000bc0  6f 62 67 65 74 29 3e 30  20 8c 20 f2 73 61 76 65  |obget)>0 . .save|
00000bd0  6c 6f 6f 70 0d 05 e6 0a  d9 23 66 69 6c 65 0d 05  |loop.....#file..|
00000be0  f0 05 e1 0d 05 fa 05 3a  0d 06 04 10 dd f2 63 6f  |.......:......co|
00000bf0  6e 63 6c 75 73 69 6f 6e  0d 06 0e 0c f2 67 65 74  |nclusion.....get|
00000c00  64 61 74 61 0d 06 18 0d  f2 63 6f 6c 63 68 65 63  |data.....colchec|
00000c10  6b 0d 06 22 0d f2 69 71  72 63 68 65 63 6b 0d 06  |k.."..iqrcheck..|
00000c20  2c 1c 73 6d 61 78 3d 2d  39 39 39 39 39 39 39 3a  |,.smax=-9999999:|
00000c30  6f 62 6e 61 6d 65 24 3d  22 22 0d 06 36 17 e3 20  |obname$=""..6.. |
00000c40  6f 62 73 63 61 6e 3d 30  20 b8 20 6e 6f 6f 62 73  |obscan=0 . noobs|
00000c50  25 0d 06 40 51 e7 20 6d  62 28 6f 62 73 63 61 6e  |%..@Q. mb(obscan|
00000c60  29 3c 3e 30 20 8c 20 73  63 6f 72 65 28 6f 62 73  |)<>0 . score(obs|
00000c70  63 61 6e 29 3d 94 28 73  63 6f 72 65 28 6f 62 73  |can)=.(score(obs|
00000c80  63 61 6e 29 2f 6d 62 28  6f 62 73 63 61 6e 29 29  |can)/mb(obscan))|
00000c90  20 8b 20 73 63 6f 72 65  28 6f 62 73 63 61 6e 29  | . score(obscan)|
00000ca0  3d 30 0d 06 4a 4f e7 20  73 6d 61 78 3c 73 63 6f  |=0..JO. smax<sco|
00000cb0  72 65 28 6f 62 73 63 61  6e 29 20 8c 20 73 6e 75  |re(obscan) . snu|
00000cc0  6d 3d 6f 62 73 63 61 6e  3a 73 6d 61 78 3d 73 63  |m=obscan:smax=sc|
00000cd0  6f 72 65 28 6f 62 73 63  61 6e 29 3a 6f 62 6e 61  |ore(obscan):obna|
00000ce0  6d 65 24 3d 6e 61 6d 65  24 28 6f 62 73 63 61 6e  |me$=name$(obscan|
00000cf0  29 0d 06 54 27 f1 6f 62  73 63 61 6e 2c 6e 61 6d  |)..T'.obscan,nam|
00000d00  65 24 28 6f 62 73 63 61  6e 29 2c 73 63 6f 72 65  |e$(obscan),score|
00000d10  28 6f 62 73 63 61 6e 29  0d 06 5e 05 ed 0d 06 68  |(obscan)..^....h|
00000d20  05 e1 0d 06 72 05 3a 0d  06 7c 0e dd f2 63 6f 6c  |....r.:..|...col|
00000d30  63 68 65 63 6b 0d 06 86  14 de 73 63 6f 72 65 28  |check.....score(|
00000d40  6e 6f 6f 62 73 25 2b 32  29 0d 06 90 13 e3 20 70  |noobs%+2)..... p|
00000d50  69 63 6f 62 73 3d 31 20  b8 20 6d 62 0d 06 9a 17  |icobs=1 . mb....|
00000d60  e3 20 63 63 6c 75 64 65  3d 30 20 b8 20 6e 6f 6f  |. cclude=0 . noo|
00000d70  62 73 25 0d 06 a4 1b e3  20 6f 62 73 63 61 6e 3d  |bs%..... obscan=|
00000d80  31 20 b8 20 6d 62 28 63  63 6c 75 64 65 29 0d 06  |1 . mb(cclude)..|
00000d90  ae 64 e7 28 63 6f 6f 62  73 28 63 63 6c 75 64 65  |.d.(coobs(cclude|
00000da0  2c 6f 62 73 63 61 6e 29  20 80 20 32 5e 28 63 6f  |,obscan) . 2^(co|
00000db0  6c 28 70 69 63 6f 62 73  29 2b 31 29 29 3c 3e 30  |l(picobs)+1))<>0|
00000dc0  20 8c 20 73 63 6f 72 65  28 63 63 6c 75 64 65 29  | . score(cclude)|
00000dd0  3d 73 63 6f 72 65 28 63  63 6c 75 64 65 29 2b 70  |=score(cclude)+p|
00000de0  72 6f 62 28 63 63 6c 75  64 65 2c 6f 62 73 63 61  |rob(cclude,obsca|
00000df0  6e 29 0d 06 b8 07 ed 2c  2c 0d 06 c2 05 e1 0d 06  |n).....,,.......|
00000e00  cc 05 3a 0d 06 d6 0e dd  f2 69 71 72 63 68 65 63  |..:......iqrchec|
00000e10  6b 0d 06 e0 13 e3 20 70  69 63 6f 62 73 3d 31 20  |k..... picobs=1 |
00000e20  b8 20 6d 62 0d 06 ea 14  69 71 72 3d a4 69 71 72  |. mb....iqr=.iqr|
00000e30  28 70 69 63 6f 62 73 29  0d 06 f4 17 e3 20 63 63  |(picobs)..... cc|
00000e40  6c 75 64 65 3d 30 20 b8  20 6e 6f 6f 62 73 25 0d  |lude=0 . noobs%.|
00000e50  06 fe 1b e3 20 6f 62 73  63 61 6e 3d 31 20 b8 20  |.... obscan=1 . |
00000e60  6d 62 28 63 63 6c 75 64  65 29 0d 07 08 6e 73 63  |mb(cclude)...nsc|
00000e70  6f 72 65 28 63 63 6c 75  64 65 29 3d 73 63 6f 72  |ore(cclude)=scor|
00000e80  65 28 63 63 6c 75 64 65  29 2b 28 31 2f 28 70 72  |e(cclude)+(1/(pr|
00000e90  6f 62 28 63 63 6c 75 64  65 2c 6f 62 73 63 61 6e  |ob(cclude,obscan|
00000ea0  29 2b 2e 30 31 29 29 2a  94 28 69 71 72 2d 6f 62  |)+.01))*.(iqr-ob|
00000eb0  28 63 63 6c 75 64 65 2c  6f 62 73 63 61 6e 29 29  |(cclude,obscan))|
00000ec0  2d 30 2e 35 2a 70 72 6f  62 28 63 63 6c 75 64 65  |-0.5*prob(cclude|
00000ed0  2c 6f 62 73 63 61 6e 29  0d 07 12 07 ed 2c 2c 0d  |,obscan).....,,.|
00000ee0  07 1c 05 e1 0d 07 26 05  3a 0d 07 30 0b dd f2 62  |......&.:..0...b|
00000ef0  6f 6e 64 73 0d 07 3a 19  e3 20 63 63 6c 75 64 65  |onds..:.. cclude|
00000f00  3d 31 20 b8 20 6d 62 28  73 6e 75 6d 29 0d 07 44  |=1 . mb(snum)..D|
00000f10  09 64 65 6c 3d a3 0d 07  4e 05 f5 0d 07 58 2c 70  |.del=...N....X,p|
00000f20  72 6f 62 28 73 6e 75 6d  2c 63 63 6c 75 64 65 29  |rob(snum,cclude)|
00000f30  3d 70 72 6f 62 28 73 6e  75 6d 2c 63 63 6c 75 64  |=prob(snum,cclud|
00000f40  65 29 2b a4 70 75 70 0d  07 62 2a e7 20 70 72 6f  |e)+.pup..b*. pro|
00000f50  62 28 73 6e 75 6d 2c 63  63 6c 75 64 65 29 3c 3d  |b(snum,cclude)<=|
00000f60  30 20 8c 20 f2 67 65 74  72 69 64 3a 64 65 6c 3d  |0 . .getrid:del=|
00000f70  b9 0d 07 6c 1d fd 20 64  65 6c 3d a3 20 84 20 63  |...l.. del=. . c|
00000f80  63 6c 75 64 65 3d 6d 62  28 73 6e 75 6d 29 0d 07  |clude=mb(snum)..|
00000f90  76 05 ed 0d 07 80 05 e1  0d 07 8a 05 3a 0d 07 94  |v...........:...|
00000fa0  0b dd f2 6c 65 61 72 6e  0d 07 9e 1e f1 27 22 49  |...learn.....'"I|
00000fb0  73 20 69 74 20 61 20 22  3b 6f 62 6e 61 6d 65 24  |s it a ";obname$|
00000fc0  3b 3a f2 61 73 6b 0d 07  a8 34 e7 20 41 24 3d 22  |;:.ask...4. A$="|
00000fd0  4e 22 20 8c 20 e8 22 57  68 61 74 20 77 61 73 20  |N" . ."What was |
00000fe0  69 74 20 74 68 65 6e 22  3b 6f 62 6e 61 6d 65 6e  |it then";obnamen|
00000ff0  24 3a f2 72 65 74 68 69  6e 6b 0d 07 b2 28 f1 27  |$:.rethink...(.'|
00001000  22 57 61 73 20 69 74 20  61 20 22 3b 4d 43 43 24  |"Was it a ";MCC$|
00001010  3b 22 20 22 3b 6f 62 6e  61 6d 65 24 3b 3a f2 61  |;" ";obname$;:.a|
00001020  73 6b 0d 07 bc 18 e7 20  41 24 3d 22 4e 22 20 8c  |sk..... A$="N" .|
00001030  20 f2 72 65 63 6f 6c 6f  75 72 0d 07 c6 19 e3 20  | .recolour..... |
00001040  63 63 6c 75 64 65 3d 31  20 b8 20 6d 62 28 73 6e  |cclude=1 . mb(sn|
00001050  75 6d 29 0d 07 d0 2c 70  72 6f 62 28 73 6e 75 6d  |um)...,prob(snum|
00001060  2c 63 63 6c 75 64 65 29  3d 70 72 6f 62 28 73 6e  |,cclude)=prob(sn|
00001070  75 6d 2c 63 63 6c 75 64  65 29 2b 30 2e 32 35 0d  |um,cclude)+0.25.|
00001080  07 da 05 ed 0d 07 e4 0a  f2 62 6f 6e 64 73 0d 07  |.........bonds..|
00001090  ee 05 e1 0d 07 f8 05 3a  0d 08 02 0e dd f2 72 65  |.......:......re|
000010a0  63 6f 6c 6f 75 72 0d 08  0c 10 f2 63 6f 6c 6f 75  |colour.....colou|
000010b0  72 74 61 62 6c 65 0d 08  16 05 f5 0d 08 20 08 41  |rtable....... .A|
000010c0  24 3d be 0d 08 2a 19 fd  20 97 28 41 24 29 3e 36  |$=...*.. .(A$)>6|
000010d0  34 20 80 20 97 28 41 24  29 3c 37 30 0d 08 34 11  |4 . .(A$)<70..4.|
000010e0  4d 43 43 25 3d 97 28 41  24 29 2d 36 34 0d 08 3e  |MCC%=.(A$)-64..>|
000010f0  13 4d 43 43 24 3d 43 4e  41 24 28 4d 43 43 25 29  |.MCC$=CNA$(MCC%)|
00001100  0d 08 48 05 e1 0d 08 52  05 3a 0d 08 5c 11 dd f2  |..H....R.:..\...|
00001110  63 6f 6c 6f 75 72 74 61  62 6c 65 0d 08 66 08 eb  |colourtable..f..|
00001120  20 31 32 0d 08 70 18 2a  3c 4f 62 65 79 24 44 69  | 12..p.*<Obey$Di|
00001130  72 3e 2e 21 50 61 6c 6c  65 74 65 0d 08 7a 1f f1  |r>.!Pallete..z..|
00001140  22 57 68 61 74 20 63 6f  6c 6f 75 72 20 77 61 73  |"What colour was|
00001150  20 69 74 20 74 68 65 6e  3a 22 0d 08 84 0b e3 63  | it then:".....c|
00001160  3d 30 b8 31 35 0d 08 8e  17 fb 20 31 32 38 3a f1  |=0.15..... 128:.|
00001170  bd 28 63 2b 36 34 29 3b  22 20 22 3b 0d 08 98 0b  |.(c+64);" ";....|
00001180  fb 20 63 2b 31 32 38 0d  08 a2 13 f1 3b 22 20 20  |. c+128.....;"  |
00001190  20 20 20 20 20 20 20 20  22 3b 0d 08 ac 05 ed 0d  |        ";......|
000011a0  08 b6 05 e1 0d 08 c0 05  3a 0d 08 ca 0d dd f2 72  |........:......r|
000011b0  65 74 68 69 6e 6b 0d 08  d4 05 db 0d 08 de 18 f1  |ethink..........|
000011c0  22 50 6c 65 61 73 65 20  57 61 69 74 2e 20 2e 20  |"Please Wait. . |
000011d0  2e 22 27 0d 08 e8 0a f2  62 6f 6e 64 73 0d 08 f2  |."'.....bonds...|
000011e0  14 6f 62 6e 61 6d 65 24  3d 6f 62 6e 61 6d 65 6e  |.obname$=obnamen|
000011f0  24 0d 08 fc 05 f5 0d 09  06 09 65 72 72 3d a3 0d  |$.........err=..|
00001200  09 10 1b 6f 62 6e 61 6d  65 24 3d 22 20 22 2b 6f  |...obname$=" "+o|
00001210  62 6e 61 6d 65 24 2b 22  20 22 0d 09 1a 18 e3 20  |bname$+" "..... |
00001220  63 3d 32 20 b8 20 a9 28  6f 62 6e 61 6d 65 24 29  |c=2 . .(obname$)|
00001230  2d 31 0d 09 24 53 e7 20  28 a4 72 74 3c 39 37 29  |-1..$S. (.rt<97)|
00001240  20 80 20 28 a4 72 74 3c  3e 33 32 29 20 8c 20 6f  | . (.rt<>32) . o|
00001250  62 6e 61 6d 65 24 3d c0  6f 62 6e 61 6d 65 24 2c  |bname$=.obname$,|
00001260  63 2d 31 29 2b bd 28 a4  72 74 2b 33 32 29 2b c2  |c-1)+.(.rt+32)+.|
00001270  6f 62 6e 61 6d 65 24 2c  a9 28 6f 62 6e 61 6d 65  |obname$,.(obname|
00001280  24 29 2d 63 29 0d 09 2e  2a e7 20 28 a4 72 74 3c  |$)-c)...*. (.rt<|
00001290  39 37 20 84 20 a4 72 74  3e 31 32 32 29 20 80 20  |97 . .rt>122) . |
000012a0  a4 72 74 3c 3e 33 32 20  8c 20 65 72 72 3d b9 0d  |.rt<>32 . err=..|
000012b0  09 38 05 ed 0d 09 42 24  6f 62 6e 61 6d 65 24 3d  |.8....B$obname$=|
000012c0  c1 6f 62 6e 61 6d 65 24  2c 32 2c a9 28 6f 62 6e  |.obname$,2,.(obn|
000012d0  61 6d 65 24 29 2d 32 29  0d 09 4c 14 e7 20 65 72  |ame$)-2)..L.. er|
000012e0  72 3d b9 20 8c 20 f2 72  65 61 73 6b 0d 09 56 0b  |r=. . .reask..V.|
000012f0  fd 20 65 72 72 3d a3 0d  09 60 14 e3 20 6f 6e 6f  |. err=...`.. ono|
00001300  3d 30 20 b8 20 6e 6f 6f  62 73 25 0d 09 6a 29 e7  |=0 . noobs%..j).|
00001310  20 6e 61 6d 65 24 28 6f  6e 6f 29 3d 6f 62 6e 61  | name$(ono)=obna|
00001320  6d 65 24 20 8c 20 73 6e  75 6d 3d 6f 6e 6f 3a 65  |me$ . snum=ono:e|
00001330  72 72 3d b9 0d 09 74 05  ed 0d 09 7e 14 e7 20 65  |rr=...t....~.. e|
00001340  72 72 3d a3 20 8c 20 f2  6e 65 77 6f 62 0d 09 88  |rr=. . .newob...|
00001350  05 e1 0d 09 92 05 3a 0d  09 9c 0b dd f2 72 65 61  |......:......rea|
00001360  73 6b 0d 09 a6 47 f1 27  22 4f 62 6a 65 63 74 20  |sk...G.'"Object |
00001370  6e 61 6d 65 73 20 63 61  6e 20 6f 6e 6c 79 20 63  |names can only c|
00001380  6f 6e 74 61 69 6e 20 6c  65 74 74 65 72 73 2e 20  |ontain letters. |
00001390  50 6c 65 61 73 65 20 72  65 2d 74 79 70 65 20 74  |Please re-type t|
000013a0  68 65 20 6e 61 6d 65 22  27 0d 09 b0 1f e8 22 57  |he name"'....."W|
000013b0  68 61 74 20 77 61 73 20  69 74 20 74 68 65 6e 22  |hat was it then"|
000013c0  3b 6f 62 6e 61 6d 65 24  0d 09 ba 05 e1 0d 09 c4  |;obname$........|
000013d0  05 3a 0d 09 ce 0b dd f2  6e 65 77 6f 62 0d 09 d8  |.:......newob...|
000013e0  08 f1 22 2a 22 0d 09 e2  13 6e 6f 6f 62 73 25 3d  |.."*"....noobs%=|
000013f0  6e 6f 6f 62 73 25 2b 31  0d 09 ec 11 6d 62 28 6e  |noobs%+1....mb(n|
00001400  6f 6f 62 73 25 29 3d 6d  62 0d 09 f6 19 6e 61 6d  |oobs%)=mb....nam|
00001410  65 24 28 6e 6f 6f 62 73  25 29 3d 6f 62 6e 61 6d  |e$(noobs%)=obnam|
00001420  65 24 0d 0a 00 10 e3 20  6f 6e 6f 3d 31 20 b8 20  |e$..... ono=1 . |
00001430  6d 62 0d 0a 0a 1c 6f 62  28 6e 6f 6f 62 73 25 2c  |mb....ob(noobs%,|
00001440  6f 6e 6f 29 3d a4 69 71  72 28 6f 6e 6f 29 0d 0a  |ono)=.iqr(ono)..|
00001450  14 24 63 6f 6f 62 73 28  6e 6f 6f 62 73 25 2c 6f  |.$coobs(noobs%,o|
00001460  6e 6f 29 3d 63 6f 6c 73  28 63 6f 6c 28 6f 6e 6f  |no)=cols(col(ono|
00001470  29 29 0d 0a 1e 16 70 72  6f 62 28 6e 6f 6f 62 73  |))....prob(noobs|
00001480  25 2c 6f 6e 6f 29 3d 32  0d 0a 28 05 ed 0d 0a 32  |%,ono)=2..(....2|
00001490  0f 73 6e 75 6d 3d 6e 6f  6f 62 73 25 0d 0a 3c 05  |.snum=noobs%..<.|
000014a0  e1 0d 0a 46 05 3a 0d 0a  50 09 dd f2 61 73 6b 0d  |...F.:..P...ask.|
000014b0  0a 5a 10 f1 3b 22 20 28  59 2f 4e 29 20 22 3b 0d  |.Z..;" (Y/N) ";.|
000014c0  0a 64 05 f5 0d 0a 6e 08  41 24 3d be 0d 0a 78 14  |.d....n.A$=...x.|
000014d0  fd 20 a7 22 59 79 4e 6e  22 2c 41 24 29 3c 3e 30  |. ."YyNn",A$)<>0|
000014e0  0d 0a 82 33 e7 20 41 24  3d 22 59 22 20 84 20 41  |...3. A$="Y" . A|
000014f0  24 3d 22 79 22 8c 20 f1  22 59 65 73 22 3a 41 24  |$="y". ."Yes":A$|
00001500  3d 22 59 22 20 8b 20 f1  22 4e 6f 22 3a 41 24 3d  |="Y" . ."No":A$=|
00001510  22 4e 22 0d 0a 8c 05 e1  0d 0a 96 05 3a 0d 0a a0  |"N".........:...|
00001520  0c dd f2 67 65 74 72 69  64 0d 0a aa 17 6d 62 28  |...getrid....mb(|
00001530  73 6e 75 6d 29 3d 6d 62  28 73 6e 75 6d 29 2d 31  |snum)=mb(snum)-1|
00001540  0d 0a b4 1c e3 20 6f 62  6e 6f 3d 63 63 6c 75 64  |..... obno=cclud|
00001550  65 20 b8 20 6d 62 28 73  6e 75 6d 29 0d 0a be 21  |e . mb(snum)...!|
00001560  6f 62 28 6f 62 6e 6f 2c  73 6e 75 6d 29 3d 6f 62  |ob(obno,snum)=ob|
00001570  28 6f 62 6e 6f 2b 31 2c  73 6e 75 6d 29 0d 0a c8  |(obno+1,snum)...|
00001580  27 63 6f 6f 62 73 28 6f  62 6e 6f 2c 73 6e 75 6d  |'coobs(obno,snum|
00001590  29 3d 63 6f 6f 62 73 28  6f 62 6e 6f 2b 31 2c 73  |)=coobs(obno+1,s|
000015a0  6e 75 6d 29 0d 0a d2 25  70 72 6f 62 28 6f 62 6e  |num)...%prob(obn|
000015b0  6f 2c 73 6e 75 6d 29 3d  70 72 6f 62 28 6f 62 6e  |o,snum)=prob(obn|
000015c0  6f 2b 31 2c 73 6e 75 6d  29 0d 0a dc 05 ed 0d 0a  |o+1,snum).......|
000015d0  e6 05 e1 0d 0a f0 05 3a  0d 0a fa 0b dd f2 73 74  |.......:......st|
000015e0  6f 72 65 0d 0b 04 08 eb  20 31 32 0d 0b 0e 18 2a  |ore..... 12....*|
000015f0  3c 4f 62 65 79 24 44 69  72 3e 2e 21 50 61 6c 6c  |<Obey$Dir>.!Pall|
00001600  65 74 65 0d 0b 18 14 ff  22 53 43 48 4f 4f 53 45  |ete....."SCHOOSE|
00001610  20 22 2b 53 50 52 24 0d  0b 22 0d f0 20 26 45 44  | "+SPR$..".. &ED|
00001620  2c 30 2c 30 0d 0b 2c 35  f1 22 44 6f 20 79 6f 75  |,0,0..,5."Do you|
00001630  20 77 61 6e 74 20 6d 65  20 74 6f 20 6c 65 61 72  | want me to lear|
00001640  6e 20 66 72 6f 6d 20 74  68 69 73 20 73 70 72 69  |n from this spri|
00001650  74 65 22 3b 3a f2 61 73  6b 0d 0b 36 10 e7 20 41  |te";:.ask..6.. A|
00001660  24 3d 22 4e 22 20 8c 20  e1 0d 0b 40 18 f1 22 50  |$="N" . ...@.."P|
00001670  6c 65 61 73 65 20 77 61  69 74 2e 20 2e 20 2e 22  |lease wait. . ."|
00001680  3b 0d 0b 4a 0d f2 73 61  76 65 64 61 74 61 0d 0b  |;..J..savedata..|
00001690  54 05 e1 0d 0b 5e 05 3a  0d 0b 68 16 dd f2 6d 65  |T....^.:..h...me|
000016a0  6e 75 62 61 72 28 6f 70  74 69 6f 6e 73 29 0d 0b  |nubar(options)..|
000016b0  72 05 db 0d 0b 7c 0c f1  74 69 74 6c 65 24 27 0d  |r....|..title$'.|
000016c0  0b 86 13 e3 20 6f 3d 31  20 b8 20 6f 70 74 69 6f  |.... o=1 . optio|
000016d0  6e 73 0d 0b 90 0e f1 22  20 22 3b 6f 24 28 6f 29  |ns....." ";o$(o)|
000016e0  0d 0b 9a 05 ed 0d 0b a4  0e 6f 3d 31 3a 6f 6c 64  |.........o=1:old|
000016f0  3d 2d 31 0d 0b ae 05 f5  0d 0b b8 0b f2 69 6e 76  |=-1..........inv|
00001700  65 72 74 0d 0b c2 08 41  24 3d be 0d 0b cc 21 e7  |ert....A$=....!.|
00001710  20 41 24 3d 22 2f 22 20  80 20 6f 3c 3e 6f 70 74  | A$="/" . o<>opt|
00001720  69 6f 6e 73 20 8c 20 6f  3d 6f 2b 31 0d 0b d6 1b  |ions . o=o+1....|
00001730  e7 20 41 24 3d 22 27 22  20 80 20 6f 3c 3e 31 20  |. A$="'" . o<>1 |
00001740  8c 20 6f 3d 6f 2d 31 0d  0b e0 0e fd 20 41 24 3d  |. o=o-1..... A$=|
00001750  bd 28 31 33 29 0d 0b ea  13 f1 8a 30 2c 6f 70 74  |.(13)......0,opt|
00001760  69 6f 6e 73 2b 32 29 3b  0d 0b f4 05 e1 0d 0b fe  |ions+2);........|
00001770  05 3a 0d 0c 08 0c dd f2  69 6e 76 65 72 74 0d 0c  |.:......invert..|
00001780  12 1e e7 20 6f 6c 64 3c  3e 2d 31 20 8c 20 f1 8a  |... old<>-1 . ..|
00001790  30 2c 6f 6c 64 2b 31 29  3b 22 20 22 0d 0c 1c 10  |0,old+1);" "....|
000017a0  f1 8a 30 2c 6f 2b 31 29  3b 22 3e 22 0d 0c 26 09  |..0,o+1);">"..&.|
000017b0  6f 6c 64 3d 6f 0d 0c 30  05 e1 0d 0c 3a 05 3a 0d  |old=o..0....:.:.|
000017c0  0c 44 0e dd a4 69 71 72  28 6f 6e 6f 29 0d 0c 4e  |.D...iqr(ono)..N|
000017d0  09 64 76 61 3d 30 0d 0c  58 12 e3 20 78 74 3d 30  |.dva=0..X.. xt=0|
000017e0  20 b8 20 78 61 78 2d 31  0d 0c 62 34 e7 20 62 6c  | . xax-1..b4. bl|
000017f0  6f 63 6b 28 6f 6e 6f 2c  78 74 29 3e 62 6d 69 6e  |ock(ono,xt)>bmin|
00001800  28 6f 6e 6f 2c 78 74 29  20 8c 20 f2 61 64 64 69  |(ono,xt) . .addi|
00001810  71 72 3a 64 76 61 3d 64  76 61 2b 31 0d 0c 6c 05  |qr:dva=dva+1..l.|
00001820  ed 0d 0c 76 22 3d 69 77  28 a8 28 64 76 61 2a 2e  |...v"=iw(.(dva*.|
00001830  37 35 29 29 2f 69 77 28  a8 28 64 76 61 2a 2e 32  |75))/iw(.(dva*.2|
00001840  35 29 29 0d 0c 80 05 3a  0d 0c 8a 0c dd f2 61 64  |5))....:......ad|
00001850  64 69 71 72 0d 0c 94 10  e3 20 78 73 3d 30 20 b8  |diqr..... xs=0 .|
00001860  20 64 76 61 0d 0c 9e 1b  e7 20 a4 64 69 66 3e 3d  | dva..... .dif>=|
00001870  69 77 28 78 73 29 20 8c  20 70 6f 73 3d 78 73 0d  |iw(xs) . pos=xs.|
00001880  0c a8 05 ed 0d 0c b2 13  e3 20 73 3d 70 6f 73 2b  |......... s=pos+|
00001890  31 20 b8 20 64 76 61 0d  0c bc 13 69 77 28 78 73  |1 . dva....iw(xs|
000018a0  2d 31 29 3d 69 77 28 78  73 29 0d 0c c6 05 ed 0d  |-1)=iw(xs)......|
000018b0  0c d0 10 69 77 28 70 6f  73 29 3d a4 64 69 66 0d  |...iw(pos)=.dif.|
000018c0  0c da 05 e1 0d 0c e4 05  3a 0d 0c ee 24 dd a4 64  |........:...$..d|
000018d0  69 66 3d 62 6c 6f 63 6b  28 6f 6e 6f 2c 78 74 29  |if=block(ono,xt)|
000018e0  2d 62 6d 69 6e 28 6f 6e  6f 2c 78 74 29 0d 0c f8  |-bmin(ono,xt)...|
000018f0  05 3a 0d 0d 02 09 dd a4  70 75 70 0d 0d 0c 08 78  |.:......pup....x|
00001900  74 3d 30 0d 0d 16 0e 6f  6e 6f 3d 63 63 6c 75 64  |t=0....ono=cclud|
00001910  65 0d 0d 20 11 69 71 72  3d a4 69 71 72 28 6f 6e  |e.. .iqr=.iqr(on|
00001920  6f 29 0d 0d 2a 39 e7 20  69 71 72 3c 3d 6f 62 28  |o)..*9. iqr<=ob(|
00001930  73 6e 75 6d 2c 63 63 6c  75 64 65 29 20 8c 20 78  |snum,cclude) . x|
00001940  74 3d 28 69 71 72 2f 6f  62 28 73 6e 75 6d 2c 63  |t=(iqr/ob(snum,c|
00001950  63 6c 75 64 65 29 29 2a  31 2e 35 0d 0d 34 38 e7  |clude))*1.5..48.|
00001960  20 69 71 72 3e 6f 62 28  73 6e 75 6d 2c 63 63 6c  | iqr>ob(snum,ccl|
00001970  75 64 65 29 20 8c 20 78  74 3d 28 6f 62 28 73 6e  |ude) . xt=(ob(sn|
00001980  75 6d 2c 63 63 6c 75 64  65 29 2f 69 71 72 29 2a  |um,cclude)/iqr)*|
00001990  31 2e 35 0d 0d 3e 37 e7  20 28 32 5e 28 63 6f 6c  |1.5..>7. (2^(col|
000019a0  28 6f 6e 6f 29 2b 31 29  20 80 20 63 6f 6f 62 73  |(ono)+1) . coobs|
000019b0  28 73 6e 75 6d 2c 63 63  6c 75 64 65 29 29 20 8c  |(snum,cclude)) .|
000019c0  20 78 74 3d 78 74 2b 2e  32 35 0d 0d 48 1f e7 20  | xt=xt+.25..H.. |
000019d0  63 6f 6c 28 6f 6e 6f 29  3d 4d 43 43 25 20 8c 20  |col(ono)=MCC% . |
000019e0  78 74 3d 78 74 2b 2e 32  35 0d 0d 52 07 3d 78 74  |xt=xt+.25..R.=xt|
000019f0  0d 0d 5c 05 3a 0d 0d 66  19 dd a4 72 74 3d 97 28  |..\.:..f...rt=.(|
00001a00  c1 6f 62 6e 61 6d 65 24  2c 63 2c 31 29 29 0d 0d  |.obname$,c,1))..|
00001a10  70 05 3a 0d 0d 7a 2f dd  a4 70 65 72 61 3d a8 28  |p.:..z/..pera=.(|
00001a20  28 31 30 30 2f 28 78 61  78 2a 79 61 78 29 29 2a  |(100/(xax*yax))*|
00001a30  28 28 58 2d 31 29 2b 28  59 2d 31 29 2a 78 61 78  |((X-1)+(Y-1)*xax|
00001a40  29 29 0d 0d 84 05 3a 0d  0d 8e 53 dc 20 22 77 68  |))....:...S. "wh|
00001a50  69 74 65 22 2c 33 2c 22  6c 69 67 68 74 20 67 72  |ite",3,"light gr|
00001a60  65 79 22 2c 37 2c 22 6d  65 64 69 75 6d 20 67 72  |ey",7,"medium gr|
00001a70  65 79 22 2c 31 34 2c 22  64 61 72 6b 20 67 72 65  |ey",14,"dark gre|
00001a80  79 22 2c 32 38 2c 22 76  65 72 79 20 64 61 72 6b  |y",28,"very dark|
00001a90  20 67 72 65 79 22 2c 32  34 30 0d 0d 98 3d dc 20  | grey",240...=. |
00001aa0  22 65 78 74 72 65 6d 65  6c 79 20 64 61 72 6b 20  |"extremely dark |
00001ab0  67 72 65 79 22 2c 32 34  30 2c 22 6c 69 67 68 74  |grey",240,"light|
00001ac0  20 62 6c 61 63 6b 22 2c  32 34 30 2c 22 62 6c 61  | black",240,"bla|
00001ad0  63 6b 22 2c 32 34 30 0d  0d a2 3d dc 20 22 64 61  |ck",240...=. "da|
00001ae0  72 6b 20 62 6c 75 65 22  2c 38 34 34 38 2c 22 79  |rk blue",8448,"y|
00001af0  65 6c 6c 6f 77 22 2c 34  36 30 38 2c 22 67 72 65  |ellow",4608,"gre|
00001b00  65 6e 22 2c 31 30 32 34  2c 22 72 65 64 22 2c 31  |en",1024,"red",1|
00001b10  38 34 33 32 0d 0d ac 2b  dc 20 22 6c 69 67 68 74  |8432...+. "light|
00001b20  20 79 65 6c 6c 6f 77 22  2c 34 36 30 38 2c 22 64  | yellow",4608,"d|
00001b30  61 72 6b 20 67 72 65 65  6e 22 2c 38 34 34 38 0d  |ark green",8448.|
00001b40  0d b6 27 dc 20 22 6f 72  61 6e 67 65 22 2c 31 36  |..'. "orange",16|
00001b50  33 38 34 2c 22 6c 69 67  68 74 20 62 6c 75 65 22  |384,"light blue"|
00001b60  2c 33 32 37 36 38 0d ff                           |,32768..|
00001b68