P704 CEEFAX 704 Thu 23 Jun 20:10/01  ANIMAL Age: 7+ bAnimal" is unusual in that it may be used at various levels; as a simple game or as a serious educational piece of software. The program aims to develop the ability to classify objects (animals) using YES/NO questions, and an understanding of logical information processing using a "tree" structure. Instructions for use are included in the program, and presented in "menu" form. Information may be saved to disc or cassette tape, and may be recalled and modified at a later date.
P704 CEEFAX 704 Thu 23 Jun 10:44/52 |B2181F|a36ANIMAL11821:06/83|i24BBBC316k |p|s÷#1÷e|s÷Z0 2010IFYwhere%>13PROCspace(21):V.28,0,24, 39,5,12:Xwhere%=8:Ywhere%=1 2020IFLE.ani mal$(I%),2)="/a"TH.PROCprint#animal(0):P ROCDBL(letter$,Xwhere%,Ywhere%):Ywhere%= Ywhere%+2 2030I%=I%+1 2040U.animal$(I%)= "" 2050PROCspace(%1):PROCcentre(CHR$C%+" Questions I know",1):V.28,0,24,39,5,12:X where%=8:Ywhere%=1 2060Ywhere%=1:Xwhere% =1:I%=1 2070REP. 2080IFLE.animal$(I%),2) ="/Q"PROCprint#animal(1):PROCquestprint( letter$,Ywhere%):Yw(ere%=Ywhere%+inc 209 0I%=I%+1 2100U.animal$(I%)="" 2110PROCsp ace(21) 2120E. 2130REM(***************** *************) 2140DEFPROCprint#animal(X %) 2150letter$="" 2160IFX%=1G.2210 2170F .count%=3TOLEN(animal$(I%)) 2180letter$= letter$+M.animal$(I%),count%,1) 2190N.co unt% 2200IFX%=0E. 2210IFYwhere%>=13PROCs pace(21):V.28,0,24,39,5,12:Xwhere%=1:Ywh
P704 CEEFAX 704 Thu 23 Jun 20:08/08 |B2191F|a36ANIMAL11821:06/83|i24BBBC316k |p|s÷#1÷e|s÷Z0 2240letter$=letter$+M.animal$(I%),count% ,1):count%=count%+1 2250U.M.animal$(I%), count%,1)="/" 2260letter$=letter$+"?":IF LEN(letter$)<=32letter$=letter$+STRI.33- LEN(letter$)," ") 2270E. 2280DEFPROCtest (K%) 2290LOC.t$,t1$ 2300t$="/Y"+animal$( 0):t1$="/N"+animal$(0) 2310IFINS.animal$ (K%),t$)<>0G.2330 2320IFINS.animal$(K%), t1$)=0fnd=FA.:E. 2330animal$(K%)=animal$ (mjmber%):fnd=TRUE 2340E. 2350DEFPROCcen tre(X$,Y%) 2360PROCDBL(X$,20-.5*LEN(X$)+ (ASC(LE.X$,1))>127),Y%) 2370E. 2380REM(* ****************************) 2390DEFPRO CDBL(X$,X1%,Y1%) 2400P.TAB(X1%-1,Y1%)CHR $&8D;X$;TAB(X1%-1,Y1%+1)CHR$&8D;X$;:V.11 2410E. 2420REM(************************ *****) 2430DEFPROCspace(Y%) 2450V.26 24 60PROCcentre(CHR$C%+"Press "+CHR$F%+"SPA CE "+CHR$C%+bbar",Y%) 2480REP.U.GET=32 2 490E. 2520REM(************************** ***) |c0
P704 CEEFAX 704 Thu 23 Jun 20:05/25 |B21A1F|a36ANIMAL11821:06/83|i24BBBC316k |p|s÷#1÷e|s÷Z0 2530DEFPROCOFF:V.23;11,0;0;0;0:E. 2540DE F0ROBON5--23;11,255;0;0;05E. 2+50REM(*** **************************) 2560DEFPROCG P (E2,L%) 2570LOC.B%,H% 2580IFF2<>6A.L%< 34PROCON 2590*FX15 2600P%=POS 2610A$="": C$="":IFF2<>6A.L%<34PROCDBL(CHR$F%+STRI. L%,".")+STRI.L%,CHR$8),P%,VP.) 2620IFF2< >6A.L%>34PROCDBL(CHR$F%+STRI.34,"."),P%, VP.):PROCDBL(CHR$F%+STRI.L%-34,".")+STRI .L%-34,CHR$8),P%,VP.+2):V.11,11 2630B%=G ET:H%=LEN(A$) 2640IFXB%=32)A.(Hk>0)TH.27 90 EL.IFXB%=32)A.(H%=0)TH.2630 2650IF(B %=13)A.(H%>0)TH.2850 2660IFXB%=127)A.(H% >0)A.F2=6A$=LE.A$,H%-1):PROCBOX(A$+STRI. 3-LEN(A$)," "),hor,vert):G.2630 2670IF(B %=127)A.(H%>0A.H%<35)A.F2<>6A$=LE.A$,H%- 1):PROCDBL(CHR$F%+A$+".",P%,VP.):V.8:G.2 630 2680IF(B%=127)A.(H%>0A.H%>=35)A.F2<> 6A$=LE.A$,H%-1):C$=LE.C$,LEN(C$)-1):PROC DBL(CHR$F%+C$+".",P%,VP.+2):V.11,11,8:G. 2630 |c0
P704 CEEFAX 704 Thu 23 Jun 20:09/22 |B21B1F|a36ANIMAL11821:06/83|i24BBBC316k |p|s÷#1÷e|s÷Z0 2690IFF2=1A.(B%>=49A.B%<=54)TH.2790 2700 IFF2=2A.((B%>=65A.B%<=90)OR(B%>=97A.B%<= 122)ORXB%=46)OR(B%=63))TH.2790 2710IFF2= 3A.((B%>=65A.B%<=90)OR(B%>=48A.B%<=57)OR (B%>=97A.B%<=122))TH.2790 2720IFF2=4A.B% <>13TH.2790 2730IFF2=5A.((B%>=65A.B%<=9 0)OR(B%>=97A.B%<=122)OR(B%=45)OR(B%=44)O R(B%=39)OR(B%=38))TH.2790 2740IFH%=0A.B %>97B%=B%-32 EL.IFH%>0A.B%<91B%=B%+32 27 50B$=CHR$(B%) 2760IFF2=6A.(B$="Y"ORB$="N "ORB$="e"ORB$="s"ORB$="o")TH.2790 2770IF F2=7A.((B%>=65A.B%<=90)OR(B%>=97A.B%<=12 2)OR(B%=46))TH.2790 2780V.7:G.2630 2790I FH%=0A.B%>90B%=B%-32 EL.IFH%>0A.B%>64A.B %<91B%=B%+32 2800IFH%=0A.F2=7B%=B%+32 28 10IF(H%6A$=A$+CHR$(B%): PROCDBL(CHR$F%+A$,P%,VP.):G.2630 2820IF( H%33A.F2<>6A$=A$+CHR$(B%):C$=C$ +CHR$(B%):PROCDBL(CHR$F%+C$,P%,VP.+2):V. 11,11:G.2630 |c0
P704 CEEFAX 704 Thu 23 Jun 20:05/58 |B21C1F|a36ANIMAL11821:06/83|i24BBBC316k |p|s÷#1÷e|s÷Z0 2830IF(H% XXA$+STRI.3-LEN(A$)," "),hor,vert):G.263 0 2840IFH%=L%V.7:G.2630 2850IF(RI.A$,1)= " ")OR(RI.A$,1)=".")OR(RI.A$,1)="?")A$=L E.A$,LENA$-1):G.2850 2860PROCOFF 2870E. 2880REM(*****************************) 2 890DEFPROCretrieve#data 2900LOC.file#nk m,index% 2910V.26,12 2920PROCtape("Load" ) 2930V.28,0,24,39,3,12 2950PROCspace(21 ) 2960ONERR.G.3100 2970V.28,0,24,39,3,12 2980PROCcentre("Please wait",9) 2990fil e#num =OP.filename$ 3000PROCcentre("Load ing data",9) 3010I.£file#num,animal$(0) 3020F.index%=1TOVAL(animal$(0)) 3030I.£f ile#nuJ,animal$(index%) 3040N.index% 305 0CLO.£0 3060PROCcentre("D ta recgverdd", 9) 3070PROCspace(21) 3080file=TRUE 3090E . 3100IFERR<>17PROCcentre(" Read erro r. ",9):PROCspace(21):G.180 EL.180 31 10DEFPROCsave 3120LOC.file#num,index% 31 30V.26,12 3140PROCtape("Savj") |c0
P704 CEEFAX 704 Thu 23 Jun 20:05/15 |B21D1F|a36ANIMAL11821:06/83|i24BBBC316k |p|s÷#1÷e|s÷Z0 3150V.21 3160file#num =OPENO.filen!me$ 3 170V.6,12 3180PROCcentre("Saving data",9 ) 3190ONERR.G.3100 3200P.£file#num,anima l$(0) 3210F.index%=1TOVAL(animal$(0)) 32 20P.£file#num,animal$(index%) 3230N.inde x% 3240CLO.£0 3250PROCcentre(" Finished ",9) 3260PROCspace(21) 3270E. 3280REM( *****************************) 3290DEFPR OCtape(process$) 3300PROCcentre(CHR$C%+p rocess$,1) 3310PROCcentre("Please type i n the name",10) 3320PROCDBL("of the file . ",8,12):PROCGPI(4,10) 3330filename$=A$ 3340IFprocess$="Save"TH.V.28,0,24,39,3, 12:PROCDBL(" Press"+CHR$F%+"RETURN "+CHR$E%+"to record"+CHR$13+" ",2,10) 33 45REP.U.GET=13 3350E. 3360DEFPROCdelete 3370LOC.number% 3380number%=VAL(animal$( 0))-2 3390IFnumber%+2<5E. |c0
P704 CEEFAX 704 Thu 23 Jun 20:46/32 |B21E1F|a36ANIMAL11821:06/83|i24BBBC316k |p|s÷#1÷e|s÷Z0 3400V.26,12:PROCcentre(CHR$C%+"Delete ", 1):V.28,0,24,39,3,12:PROCcentre("Are you sure you want to delete the",7):PROCcen tre(RI.animal$(number%+1),LEN(animal$(nu mber%+1))-2)+"?",9):PROCquestion(17) 341 0IFLE.A$,1)="N"E. 3420V.28,0,24,39,3,12: PROCcentre(CHR$C%+"Please wait ",9) 3430 animal$(0)=STR$(number%) 3440I%=1:REP.IF LE.animal$(I%),2)="/Q"PROCtest(I%) 3450I %=I%+1:U.fnd 3460PROCspace(21) 3470V.28, 0,24,39X3,12:PROCcentre(RI.animal$(mumbe r%+1),LEN(animal$(number%+1))-2),7):PROC centre(CHR$F%+"has been deleted",9):PROC space(21) 3480animal$(number%)="":animal $(number%+1)="" 3490E. 3500DEFPROCquestp rint(Z$,L%) 3510inc=2 3520IFLEN(Z$)<34PR OCcentre(Z$,L%):E.: EL.IF(M.Z$,34,1)<>" "A.M.Z$,35,1)<>" ")PROCcentre(LE.Z$,34)+ "-",L%) EL.PROCcentre(LE.Z$,34),L%) 3530 PROCDBL(RI.Z$,LEN(Z$)-34),2,L%+2):inc=4 3540E. |c0
P704 CEEFAX 704 Thu 23 Jun 20:10/48 |B21F1F|a36ANIMAL11821:06/83|i24BBBC316k |p|s÷#1÷e|s÷Z0 3550DEFPROCwhich#article(which$) 3560LOC .a$ 3570a$=LE.which$,1) 3580IFa$="a"ORa$ ="e"ORa$="i"ORa$="o"TH.article$=" an " E L.article$=" a " 3590E. 3600REM(******** *********************) 3610DEFPROCBOX(X $,X%,Y%) 3620a$=CHR$150+CHR$104+STRI.5,C HR$44)+CHR$52+CHR$135:b$=CHR$150+CHR$106 +CHR$135+X$+CHR$150+CHR$53+CHR$135:c$=CH R$150+CHR$42+STRI.5,CHR$44)+CHR$37+CHR$1 35 3630P.TAB(X%,Y%)a$ 3640PROCDBL(b$,X%, Y%+1):P^TAB(X%,Y%+3)c$ 3650E. 3660IFERR< >17TH.MO.7:REPO.:P." at line ";ERL:END: EL.180 3670REM(************************* ****) 3680DEFPROCcolours 3690C%=129:REM RED 3691D%=130:REM GREEN 3692E%=135:REM WHITE 3693F%=131:REM YELLOW 3700E. |c0