8-Bit Software Online Conversion
New 8BS Questionnaire - Listing
190:
210ONERRORGOTO230
230ONERRORREPORT:PRINT" at line ";ERL:
END
240MODE7
250PROCa
260PROCb
270PROCc
280PROCd
290PROCe
300PROCf
310MODE7
320PROCg
330END
340:
350DEFPROCa
360*FX229,1
370*FX4,1
380*FX225,140
390PROCh
400ENDPROC
410:
420DEFPROCg
430*FX229,0
440*FX4,0
450*FX225,1
460PROCi
470ENDPROC
480:
490DEFPROCb
500DIMj%256
510ONERRORVDU6:CLOSE#0:MODE7:REPORT:PR
INT" at line ";ERL:PROCk("KEY0 LIST "+ST
R$(ERL)+"|M"):PROCk("FX21"):PROCk("FX138
,0,128"):PROCg:END
520DIMl$(7)
530PROCm
540PROCn
550ENDPROC
560:
570DEFPROCh
580VDU23,1,0;0;0;0;
590ENDPROC
600:
610DEFPROCi
620VDU23,1,1;0;0;0;
630ENDPROC
640:
650DEFFNS
660="Quaire"
670:
680DEFPROCm
690o%=6
700p%=3
710q%=3
720r%=7
730s%=3
740t%=7
750u%=7
760v%=3
770w%=7
780x%=7
790y%=3
800z%=7
810aa%=3
820ba%=3
830ca%=3
840da%=7
850ea%=3
860fa%=7
870ga%=3
880ha%=7
890IFw%=v%THENVDU26,12:PRINT"personal`
data% and personal`heading% arethe same.
":PROCg:END
900ENDPROC
910:
920DEFPROCn
930LOCALia%
940VDU26,12
950PRINT" ";CHR$(144+o%);"¶/
//////%¶/////////////////¶";
960PRINTCHR$(144+o%);"¶///////////*///
///// ";CHR$(144+o%);"¶";
970PRINTCHR$(144+o%);"¶";CHR$(144+p%);
"jk 74$5 j£`p`pj 0 0p0p`p ";CH
R$(144+o%);"¶";
980PRINTCHR$(144+o%);"¶";CHR$(144+p%);
"jk"!7457 "kjjj$j!545=55j. ";CH
R$(144+o%);"¶";
990PRINTCHR$(144+o%);"
""£ £ !£! "£"£" "!££!!!!"£ ";CH
R$(145);" ";
1000FORia%=1TO18
1010PRINTCHR$(144+o%);"¶";SPC(36);CHR$(
144+o%);"¶";
1020NEXT
1030PRINTCHR$(144+o%);"¶|||||||||||||||
||||||||||||||||||||||¶";
1040VDU28,2,22,37,5
1050ENDPROC
1060:
1070DEFPROCk($j%)
1080LOCALX%,Y%
1090X%=j%MOD256
1100Y%=j%DIV256
1110CALL&FFF7
1120ENDPROC
1130:
1140DEFPROCd
1150PROCq
1160PRINTTAB(0,2);CHR$(128+r%);"Please
insert your 8BS submissions"'CHR$(128+r%
);"disc into drive 0 and press SPACE"'CH
R$(128+r%);"when you are ready..."
1170PRINT'CHR$(128+r%);"The disc must b
e in the drive at"'CHR$(128+r%);"all tim
es when using this program."
1180PROCja
1190IFFNka=8THENPROCk("MOUNT 0"):PROCk(
"DIR $")ELSEPROCk("DRIVE 0"):PROCk("DIR
$")
1200IFFNla("!Quest")THENma%=OPENIN("!Qu
est"):na%=BGET#ma%:CLOSE#ma%ELSEna%=-1
1210IFna%>0THENPRINT'CHR$(128+r%)"This
program can only handle"'CHR$(128+r%)"ve
rsion 0 files. Do you want to"'CHR$(128+
r%)"delete the existing answers and"'CHR
$(128+r%)"create a new answer file?";:na
%=-2-FNoa
1220IFna%=0THENPROCpa(FALSE):PROCu
1230IFna%=-1THENna%=0:PROCpa(TRUE)
1240IFna%=-2THENVDU26,12:PROCg:END
1250ENDPROC
1260:
1270DEFFNoa
1280LOCALqa$
1290PRINTCHR$(128+s%);
1300*FX21
1310REPEAT
1320qa$=CHR$(GETAND&DF)
1330UNTILqa$="Y"ORqa$="N"
1340IFqa$="Y"THENPRINT"Yes"ELSEPRINT"No
"
1350=(qa$="Y")
1360:
1370DEFPROCja
1380*FX21
1390REPEATUNTILGET=32
1400ENDPROC
1410:
1420DEFPROCq
1430CLS
1440PRINTTAB(5,0);CHR$(128+q%);"Questio
nnaire system 0.10"
1450ENDPROC
1460:
1470DEFFNka
1480LOCALA%,Y%
1490A%=0
1500Y%=0
1510=(USR(&FFDA)AND&FF)
1520:
1530DEFFNla(ra$)
1540LOCALma%
1550ma%=OPENIN(ra$)
1560IFma%=0THEN=FALSE
1570CLOSE#ma%
1580=TRUE
1590:
1600DEFPROCc
1610LOCALA%,X%,Y%
1620PROCq
1630PRINTTAB(0,2);
1640IFNOTFNla("Questns")THENPRINTCHR$(1
28+t%);"Sorry, I can't find the question
s."'CHR$(128+t%);"Press SPACE to continu
e...":PROCja:VDU26,12:PROCg:END
1650PRINTCHR$(128+t%);"Please wait, loa
ding questions..."'
1660DIMsa%FNta("Questns")-1
1670PROCk("Load Questns "+STR$÷(sa%))
1680IF?sa%<>0THENPRINTCHR$(128+t%);"Sor
ry, this program can only handle";CHR$(1
28+t%);"version 0 question files. Press"
'CHR$(128+t%);"SPACE to continue...":PRO
Cja:VDU26,12:PROCg:END
1690ENDPROC
1700:
1710DEFFNta(ra$)
1720LOCALma%,ua%
1730ma%=OPENIN(ra$)
1740ua%=EXT#ma%
1750CLOSE#ma%
1760=ua%
1770:
1780DEFPROCpa(va%)
1790LOCALwa%,xa%,ya%,za%
1800DIMab%(sa%!5,1)
1810bb%=1+4+3+41+7*41+1+41+1+5*41+5*41
1820wa%=9
1830FORxa%=1TOsa%!5
1840ab%(xa%,0)=wa%
1850ab%(xa%,1)=bb%
1860wa%=wa%+LEN($(sa%+wa%))+1
1870IFsa%?wa%=0THENbb%=bb%+2:cb%=sa%?(w
a%+1):wa%=wa%+2:FORdb%=1TOcb%:wa%=wa%+LE
N($(sa%+wa%))+1:NEXT
1880IFsa%?wa%=1THENbb%=bb%+5:wa%=wa%+9
1890IFsa%?wa%=2THENbb%=bb%+2+sa%?(wa%+1
):wa%=wa%+2
1900NEXT
1910DIMeb%bb%-1
1920IFNOTva%THENENDPROC
1930eb%?0=0
1940eb%!1=sa%!1
1950eb%!5=&2E2E2E2E
1960FORya%=8TO295STEP41
1970$(eb%+ya%)=""
1980NEXT
1990eb%?336=255
2000$(eb%+337)=""
2010eb%?378=0
2020FORya%=379TO748STEP41
2030$(eb%+ya%)=""
2040NEXT
2050PROCfb
2060FORya%=1TOsa%!5
2070za%=sa%+(ab%(ya%,0)+LEN($(sa%+ab%(y
a%,0)))+1)
2080eb%?ab%(ya%,1)=?za%
2090IF?za%=0THENeb%?(ab%(ya%,1)+1)=0
2100IF?za%=1THENeb%!(ab%(ya%,1)+1)=za%!
5+1
2110IF?za%=2THEN$(eb%+ab%(ya%,1)+1)=""
2120NEXT
2130PROCf
2140ENDPROC
2150:
2160DEFPROCfb
2170LOCALqa%,gb%
2180REPEAT
2190PROChb
2200ib%=10:jb%=2
2210REPEAT
2220VDU31,ib%,jb%
2230PROCi
2240REPEAT
2250*FX21
2260qa%=GET
2270UNTIL(qa%>=32ANDqa%<=127)ORqa%=13OR
qa%=27OR(qa%>=136ANDqa%<=140)
2280PROCh
2290kb%=-1
2300IFqa%=140THENPROClb:PROCmb:PROChb
2310IFqa%=127ANDFNnb(ib%-1,jb%)<>(128+w
%)ANDjb%<>2THENkb%=ib%:qa%=137
2320IFqa%=13THENqa%=138:ib%=1
2330REPEAT
2340IFqa%=138ANDjb%<15THENjb%=jb%+1
2350IFqa%=139ANDjb%>2THENjb%=jb%-1
2360UNTILFNnb(0,jb%)<>32
2370IFqa%>=32ANDqa%<=126ANDjb%<>5ANDjb%
<>15THENVDU31,ib%,jb%,qa%:qa%=137
2380IF(qa%AND&DF)=89OR(qa%AND&DF)=78AND
jb%=5THENeb%?336=-255*((qa%AND&DF)=89):P
RINTTAB(ib%,jb%);FNob(eb%?336)
2390IF(qa%AND&DF)=89OR(qa%AND&DF)=78AND
jb%=15THENeb%?378=-255*((qa%AND&DF)=89):
PRINTTAB(ib%,jb%);FNob(eb%?378)
2400IFqa%=138ORqa%=139THENib%=FNpb(ib%,
jb%)
2410IFqa%=136ANDFNnb(ib%-1,jb%)<>(128+w
%)THENib%=ib%-1
2420IFqa%=137ANDib%<34ANDjb%<>5ANDjb%<>
15THENib%=ib%+1
2430IFjb%=2ANDib%>12THENib%=12
2440IFkb%<>-1THENPROCqb
2450PROCi
2460UNTILqa%=27
2470PROCh
2480PROClb
2490PROCq
2500gb%=FALSE
2510PRINTTAB(0,2);
2520IFNOTFNrb(sb$)THENPRINTCHR$(128+x%)
;"You must enter a valid user ID.":gb%=T
RUE
2530IFtb$=""THENPRINTCHR$(128+x%);"You
must enter your name.":gb%=TRUE
2540IFl$(1)=""THENPRINTCHR$(128+x%);"Yo
u must enter your address.":gb%=TRUE
2550IFgb%THENPRINT'CHR$(128+x%);"Press
SPACE to continue...":PROCja
2560UNTILgb%=FALSE
2570ENDPROC
2580:
2590DEFFNub(ib%,jb%)
2600LOCALvb$,wb%,xb%,yb%,zb%
2610IFHIMEM<>&7C00THEN=FNac(ib%,jb%)
2620vb$=""
2630xb%=FALSE
2640yb%=&7C02+34+(jb%+5)*40
2650zb%=&7C02+ib%+(jb%+5)*40
2660FORwb%=yb%TOzb%STEP-1
2670IFNOTxb%THENIF?wb%<>46AND?wb%<>32TH
ENxb%=TRUE
2680IFxb%THENvb$=CHR$(?wb%)+vb$
2690NEXT
2700IFINSTR(vb$,"#")=0ANDINSTR(vb$,"`")
=0ANDINSTR(vb$,"£")=0THEN=vb$ELSE=FNac(i
b%,jb%)
2710:
2720DEFFNac(ib%,jb%)
2730LOCALvb$,wb%,xb%,nb%
2740vb$=""
2750xb%=FALSE
2760FORwb%=34TOib%STEP-1
2770nb%=FNbc(wb%,jb%)
2780IFNOTxb%THENIFnb%<>46ANDnb%<>32THEN
xb%=TRUE
2790IFxb%THENvb$=CHR$(nb%)+vb$
2800NEXT
2810=vb$
2820:
2830DEFFNcc(vb$)
2840LOCALdc%
2850REPEAT
2860dc%=(RIGHT$(vb$,1)="."ORRIGHT$(vb$,
1)=" ")
2870IFdc%THENvb$=LEFT$(vb$,LEN(vb$)-1)
2880UNTILNOTdc%
2890=vb$
2900:
2910DEFFNec(fc$)
2920LOCALgc$,hc%,nb%
2930IFfc$=""THEN=""
2940gc$=""
2950FORhc%=1TOLEN(fc$)
2960nb%=ASC(MID$(fc$,hc%,1))
2970IFnb%>=97ANDnb%<=122THENnb%=nb%-32
2980gc$=gc$+CHR$(nb%)
2990NEXT
3000=gc$
3010:
3020DEFFNrb(sb$)
3030IFLEN(sb$)<3THEN=FALSE
3040IFINSTR(sb$,".")<>0ORINSTR(sb$," ")
<>0THEN=FALSE
3050=TRUE
3060:
3080LOCALic%
3100IFib%>kb%THENib%=ib%-2:ic$="":FORic
%=ib%+1TO34:ic$=ic$+CHR$(FNnb(ic%,jb%)):
NEXT:PRINTTAB(ib%,jb%);ic$;".":ENDPROC
3110IFkb%=ib%AND(FNnb(ib%,jb%)=32ORFNnb
(ib%,jb%)=46)THENib%=ib%-1:VDU31,ib%,jb%
,46:ENDPROC
3120IFkb%=ib%ANDFNnb(ib%,jb%)<>32ANDFNn
b(ib%,jb%)<>46THENVDU31,ib%,jb%,46:ENDPR
OC
3130ENDPROC
3140:
3150DEFPROCqb
3160IFib%>kb%THENib%=ib%-2:VDU31,ib%,jb
%,46
3170IFkb%=ib%AND(FNnb(ib%,jb%)=32ORFNnb
(ib%,jb%)=46)THENib%=ib%-1:VDU31,ib%,jb%
,46:ENDPROC
3180IFkb%=ib%ANDFNnb(ib%,jb%)<>32ANDFNn
b(ib%,jb%)<>46THENVDU31,ib%,jb%,46:ENDPR
OC
3190ENDPROC
3200:
3210DEFFNjc(kc$,ua%)
3220=LEFT$(kc$+STRING$(ua%,"."),ua%)
3230:
3240DEFFNnb(ib%,jb%)
3250IFHIMEM=&7C00THEN=?(&7C02+ib%+(jb%+
5)*40)
3260VDU31,ib%,jb%:A%=135:=((USR(&FFF4)A
ND&FFFF)DIV&100)
3270:
3280DEFFNbc(ib%,jb%)
3290LOCALA%,hc%,lc%,mc%
3300hc%=POS:lc%=VPOS
3310VDU31,ib%,jb%
3320A%=135
3330mc%=((USR(&FFF4)AND&FFFF)DIV&100)
3340VDU31,hc%,lc%
3350=mc%
3360:
3370DEFFNpb(ib%,jb%)
3380LOCALnc%,nb%
3390IFjb%=2THEN=FNoc(ib%,10,12)
3400IFjb%=3THEN=FNoc(ib%,7,34)
3410IFjb%=5THEN=32
3420IFjb%>=6ANDjb%<=12THEN=FNoc(ib%,0,3
4)
3430IFjb%=14THEN=FNoc(ib%,19,34)
3440IFjb%=15THEN=10
3450VDU7:END
3460:
3470DEFFNoc(ib%,pc%,qc%)
3480IFib%<pc%THEN=pc%ELSEIFib%>qc%THEN=
qc%ELSE=ib%
3490:
3500DEFFNob(rc%)
3510IFrc%=255THEN="Yes"ELSE="No "
3520:
3530DEFPROChb
3540LOCALsc%
3550PROCq
3560PRINTTAB(0,2);CHR$(128+v%);"User ID
:";CHR$(128+w%);CHR$(eb%?5);CHR$(eb%?6);
CHR$(eb%?7);CHR$(128+v%)
3570PRINTCHR$(128+v%);"Name:";CHR$(128+
w%);FNjc($(eb%+8),28)
3580PRINT'CHR$(128+v%);"Address:";SPC(1
4);"Publish:";CHR$(128+w%);FNob(eb%?336)
3590FORsc%=1TO7
3600PRINTCHR$(128+w%);FNjc($(eb%+8+sc%*
41),34)
3610NEXT
3620PRINT'CHR$(128+v%);"Telephone numbe
r:";CHR$(128+w%);FNjc($(eb%+337),16)
3630PRINTCHR$(128+v%);"Publish:";CHR$(1
28+w%);FNob(eb%?378)
3640PRINT'CHR$(128+y%);"Press";CHR$129;
"f0";CHR$(128+y%);"for help...";
3650ENDPROC
3660:
3670DEFPROClb
3680LOCALtc%,uc%
3690PRINTTAB(0,17);CHR$(128+ba%);"Pleas
e wait... ";
3700sb$=LEFT$(FNcc(FNec(CHR$(FNnb(10,2)
)+CHR$(FNnb(11,2))+CHR$(FNnb(12,2))))+".
..",3)
3710tb$=FNub(7,3)
3720FORtc%=6TO12
3730l$(tc%-5)=FNub(1,tc%)
3740NEXT
3750vc$=FNub(19,14)
3760$(eb%+5)=sb$
3770$(eb%+8)=tb$
3780FORuc%=1TO7
3790$(eb%+8+uc%*41)=l$(uc%)
3800NEXT
3810$(eb%+337)=vc$
3820ENDPROC
3830:
3840DEFPROCmb
3850LOCALqa%
3860PROCq
3870PRINTTAB(0,2);CHR$(128+z%);"Use the
cursor keys to move around.";CHR$(128+z
%);"Press RETURN to move to the start"'C
HR$(128+z%);"of the next line. Type as n
ormal to";CHR$(128+z%);"enter informatio
n. ";
3880PRINT"DELETE will"'CHR$(128+z%);"de
lete the character before the"'CHR$(128+
z%);"cursor but will not close up the"'C
HR$(128+z%);"gap. Press ESCAPE when you
have"'CHR$(128+z%);"finished."
3890PRINT'CHR$(128+z%);"You must enter
your user ID, name"'CHR$(128+z%);"and ad
dress. However, you can"'CHR$(128+z%);"c
hoose not to have your address"'CHR$(128
+z%);"published."
3900PRINTTAB(0,16);CHR$(128+aa%);"Press
";CHR$129;"f0";CHR$(128+aa%);"for more h
elp or ESCAPE to";CHR$(128+aa%);"continu
e editing...";
3910REPEAT
3920*FX21
3930qa%=GET
3940UNTILqa%=140ORqa%=27
3950IFqa%=27THENENDPROC
3960PROCq
3970PRINTTAB(0,2);CHR$(128+z%);"You do
not need to enter your"'CHR$(128+z%);"te
lephone number and even if you do";CHR$(
128+z%);"it will only be published if yo
u"'CHR$(128+z%);"request this."
3980PRINTTAB(0,16);CHR$(128+aa%);"Press
ESCAPE to continue"'CHR$(128+aa%);"edit
ing...";
3990REPEAT
4000*FX21
4010UNTILGET=27
4020ENDPROC
4030:
4040DEFPROCf
4050PROCk("Save !Quest "+STR$÷(eb%)+" +
"+STR$÷(bb%)+" 0 0")
4060ENDPROC
4070:
4080DEFPROCu
4090PROCk("Load !Quest "+STR$÷(eb%))
4100IFeb%!1=sa%!1THENENDPROC
4110PROCq
4120PRINTTAB(0,2);CHR$(128+u%);"Sorry -
the questionnaire ID in the";CHR$(128+u
%);"question and answer files do not"'CH
R$(128+u%);"match. Do you want to delete
the"'CHR$(128+u%);"answer file and star
t again?";
4130IFNOTFNoaTHENVDU26,12:PROCg:END
4140*Delete !Quest
4150RUN
4160:
4170DEFPROCe
4180LOCALwc%,za%,qa%,xc%,mc%
4190wc%=1
4200REPEAT
4210PROCq
4220PRINTTAB(0,2);CHR$(128+ca%);"Questi
on ";wc%;" of ";sa%!5;":"'
4230za%=FNyc(wc%)
4240PRINT';:lc%=VPOS
4250PRINTTAB(0,17);CHR$(128+y%);"Press"
;CHR$129;"f0";CHR$(128+y%);"for help..."
;
4260REPEAT
4270*FX21
4280qa%=GET
4290xc%=FALSE
4300IFqa%=140THENPROCzc:xc%=TRUE
4310IFqa%=141THENPRINTTAB(0,17);CHR$(12
8+ba%);"Please wait... ";:PROCf:PRI
NTTAB(0,17);CHR$(128+y%);"Press";CHR$129
;"f0";CHR$(128+y%);"for help...";
4320IFqa%=142THENPROCfb:xc%=TRUE
4330IFqa%=143THENPROCad:xc%=TRUE
4340IFqa%=136ANDwc%>1THENwc%=wc%-1:xc%=
TRUE
4350IFqa%=137ANDwc%<sa%!5THENwc%=wc%+1:
xc%=TRUE
4360mc%=-1
4370IFza%=0THENmc%=FNbd(qa%,wc%)
4380IFza%=1THENmc%=FNcd(qa%,wc%,lc%)
4390IFza%=2THENmc%=FNvb(qa%,wc%,lc%)
4400IFmc%>0THENwc%=mc%:xc%=TRUE
4410UNTILxc%ORqa%=27
4420UNTILqa%=27
4430ENDPROC
4440:
4450DEFPROCzc
4460LOCALqa%
4470PROCq
4480PRINTTAB(0,2);CHR$(128+z%);"Use the
left and right cursor keys"'CHR$(128+z%
);"to move between questions. To"'CHR$(1
28+z%);"answer, either press the"'CHR$(1
28+z%);"appropriate number for multiple"
'CHR$(128+z%);"choice questions or start
";
4490PRINT"typing it";CHR$(128+z%);"in a
nd press RETURN when you have"'CHR$(128+
z%);"finished for other questions."''CHR
$(128+z%);"Pressing COPY on any question
will"'CHR$(128+z%);"indicate that you d
o not wish to"'CHR$(128+z%);"answer it."
4500PRINTTAB(0,16);CHR$(128+aa%);"Press
";CHR$129;"f0";CHR$(128+aa%);"for more h
elp or ESCAPE to";CHR$(128+aa%);"continu
e editing...";
4510REPEAT
4520*FX21
4530qa%=GET
4540UNTILqa%=140ORqa%=27
4550IFqa%=27THENENDPROC
4560PROCq
4570PRINTTAB(0,2);CHR$(128+z%);"Press";
CHR$129;"f1";CHR$(128+z%);"to save your
answers,";CHR$129;"f2"'CHR$(128+z%);"to
edit your personal details and"'CHR$129;
"f3";CHR$(128+z%);"to edit your computin
g and"'CHR$(128+z%);"general interests."
4580PRINT'CHR$(128+z%);"Press ESCAPE to
save your answers"'CHR$(128+z%);"and qu
it the program."
4590PRINTTAB(0,16);CHR$(128+aa%);"Press
ESCAPE to continue"'CHR$(128+aa%);"edit
ing...";
4600REPEAT
4610*FX21
4620UNTILGET=27
4630ENDPROC
4640:
4650DEFFNyc(dd%)
4660LOCALed%,za%
4670ed%=sa%+ab%(dd%,0)
4680PROCfd(da%,$ed%)
4690za%=ed%?(LEN($ed%)+1)
4700IFza%=0THENPROCgd(ed%):PROChd(ed%,d
d%)
4710IFza%=1THENPROCid(ed%,dd%)
4720IFza%=2THENPROCjd(ed%,dd%)
4730=za%
4740:
4750DEFFNkd(dd%)
4760LOCALl%
4770l%=sa%+ab%(dd%,0)
4780=(l%+LEN($l%)+1)
4790:
4800DEFPROCfd(C%,T$)
4810REPEAT
4820IFLEN(T$)<36THENPRINTCHR$(128+C%);T
$;SPC(35-LEN(T$));:T$=""ELSEA%=INSTR(T$,
" ",37):A%=A%+(A%=0)*-36:REPEAT:A%=A%-1:
UNTILMID$(T$,A%,1)=" ":PRINTCHR$(128+C%)
;LEFT$(T$,A%-1);SPC(36-A%);:T$=MID$(T$,A
%+1)
4830UNTILT$=""
4840ENDPROC
4850:
4860DEFPROCgd(ed%)
4870LOCALl%,ld%,md%
4880l%=ed%+LEN($ed%)+3
4890ld%=l%?-1
4900FORmd%=1TOld%
4910PRINTCHR$(128+da%);" ";md%;") ";$l%
4920l%=l%+LEN($l%)+1
4930NEXT
4940ENDPROC
4950:
4960DEFPROChd(ed%,dd%)
4970LOCALnd%
4980PRINT'CHR$(128+ea%);"Current answer
:";CHR$(128+fa%);
4990nd%=eb%?(ab%(dd%,1)+1)
5000IFnd%=0THENPRINT"No answer"ELSEPRIN
T;nd%
5010ENDPROC
5020:
5030DEFPROCid(ed%,dd%)
5040LOCALqc%,nd%
5050PRINT'CHR$(128+ea%);"Current answer
:";CHR$(128+fa%);
5060qc%=!(ed%+LEN($ed%)+6)
5070nd%=eb%!(ab%(dd%,1)+1)
5080IFnd%=qc%+1THENPRINT"No answer"ELSE
PRINT;nd%
5090ENDPROC
5100:
5110DEFPROCjd(ed%,dd%)
5120LOCALvb$
5130PRINT'CHR$(128+ea%);"Current answer
:"'CHR$(128+fa%);
5140vb$=$(eb%+ab%(dd%,1)+1)
5150IFvb$=""THENPRINT"No answer"ELSEPRI
NTvb$
5160ENDPROC
5170:
5180DEFFNbd(qa%,dd%)
5190IFNOT((qa%>=49ANDqa%<=(48+?(FNkd(dd
%)+1)))ORqa%=135)THEN=-1
5200IFqa%=135THENqa%=48
5210eb%?(ab%(dd%,1)+1)=qa%-48
5220=(dd%-(dd%<sa%!5))
5230:
5240DEFFNcd(qa%,dd%,jb%)
5250LOCALpc%,qc%,gc$,od%,ib%
5260IFNOT((qa%>=48ANDqa%<=57)ORqa%=135)
THEN=-1
5270pc%=!(FNkd(dd%)+1)
5280qc%=!(FNkd(dd%)+5)
5290IFqa%=135THENeb%!(ab%(dd%,1)+1)=qc%
+1:=(dd%-(dd%<sa%!5))
5300gc$=CHR$(qa%)
5310od%=LEN(STR$(qc%))
5320PRINTTAB(0,jb%);CHR$(128+ea%);"Edit
answer:";CHR$(128+fa%);:ib%=POS:PRINT;F
Njc(gc$,od%);CHR$(128+ea%);"(";pc%;"-";q
c%;")";TAB(ib%+1,jb%);
5330PROCi
5340REPEAT
5350REPEAT
5360*FX21
5370qa%=GET
5380UNTIL(qa%>=48ANDqa%<=57)ORqa%=13ORq
a%=127ORqa%=135
5390IFqa%=135THENgc$=STR$(qc%+1)
5400IFqa%>=48ANDqa%<=57ANDLEN(gc$)<od%T
HENgc$=gc$+CHR$(qa%):PRINTTAB(ib%,jb%);F
Njc(gc$,od%);TAB(ib%,jb%);gc$;
5410IFqa%=127ANDLEN(gc$)>0THENgc$=LEFT$
(gc$,LEN(gc$)-1):PRINTTAB(ib%,jb%);FNjc(
gc$,od%);TAB(ib%,jb%);gc$;
5420UNTIL(qa%=13AND(gc$=""OR(VAL(gc$)>=
pc%ANDVAL(gc$)<=qc%)))ORqa%=135
5430PROCh
5440IFgc$<>""THENeb%!(ab%(dd%,1)+1)=VAL
(gc$)
5450=(dd%-(dd%<sa%!5))
5460:
5470DEFFNvb(qa%,dd%,jb%)
5480LOCALod%,gc$
5490IFNOT((qa%>=32ANDqa%<=126)ORqa%=135
)THEN=-1
5500IFqa%=135THEN$(eb%+ab%(dd%,1)+1)=""
:=(dd%-(dd%<sa%!5))
5510od%=?(FNkd(dd%)+1)
5520gc$=CHR$(qa%)
5530PRINTTAB(0,jb%);CHR$(128+ea%);"Edit
answer:"'CHR$(128+fa%);FNjc(gc$,od%);TA
B(2,jb%+1);
5540PROCi
5550REPEAT
5560REPEAT
5570*FX21
5580qa%=GET
5590UNTIL(qa%>=32ANDqa%<=127)ORqa%=13OR
qa%=135
5600IFqa%>=32ANDqa%<=126ANDLEN(gc$)<od%
THENgc$=gc$+CHR$(qa%):PRINTTAB(1,jb%+1);
FNjc(gc$,od%);TAB(1,jb%+1);gc$;
5610IFqa%=127ANDLEN(gc$)>0THENgc$=LEFT$
(gc$,LEN(gc$)-1):PRINTTAB(1,jb%+1);FNjc(
gc$,od%);TAB(1,jb%+1);gc$;
5620UNTILqa%=13ORqa%=135
5630PROCh
5640IFqa%=135THEN$(eb%+ab%(dd%,1)+1)=""
5650IFgc$<>""ANDqa%<>135THEN$(eb%+ab%(d
d%,1)+1)=gc$
5660=(dd%-(dd%<sa%!5))
5670:
5680DEFPROCad
5690LOCALqa%
5700PROCpd
5710ib%=1:jb%=3
5720REPEAT
5730VDU31,ib%,jb%
5740PROCi
5750REPEAT
5760*FX21
5770qa%=GET
5780UNTIL(qa%>=32ANDqa%<=127)ORqa%=13OR
qa%=27OR(qa%>=136ANDqa%<=140)
5790PROCh
5800kb%=-1
5810IFqa%=140THENPROCqd:PROCrd:PROCpd
5820IFqa%=127ANDib%>1THENkb%=ib%:qa%=13
7
5830IFqa%=13THENqa%=138:ib%=1
5840REPEAT
5850IFqa%=138ANDjb%<14THENjb%=jb%+1
5860IFqa%=139ANDjb%>3THENjb%=jb%-1
5870UNTILFNnb(0,jb%)<>(128+ga%)
5880IFqa%>=32ANDqa%<=126THENVDU31,ib%,j
b%,qa%:qa%=137
5890IFqa%=136ANDib%>1THENib%=ib%-1
5900IFqa%=137ANDib%<34THENib%=ib%+1
5910IFjb%=2ANDib%>12THENib%=12
5920IFkb%<>-1THENPROCsd
5930PROCi
5940UNTILqa%=27
5950PROCh
5960PROCqd
5970ENDPROC
5980:
5990DEFPROCpd
6000LOCALtd%
6010PROCq
6020PRINTTAB(0,2);CHR$(128+ga%);"Comput
ing interests:"
6030FORtd%=379TO748STEP41
6040IFtd%=584THENPRINTCHR$(128+ga%)'CHR
$(128+ga%);"General interests:"
6050PRINTCHR$(128+ha%);FNjc($(eb%+td%),
34)
6060NEXT
6070PRINTTAB(0,17);CHR$(128+y%);"Press"
;CHR$129;"f0";CHR$(128+y%);"for help..."
;
6080ENDPROC
6090:
6100DEFPROCsd
6110IFib%>kb%THENib%=ib%-2:VDU31,ib%,jb
%,46
6120IFkb%=ib%AND(FNnb(ib%,jb%)=32ORFNnb
(ib%,jb%)=46)THENib%=ib%-1:VDU31,ib%,jb%
,46:ENDPROC
6130IFkb%=ib%ANDFNnb(ib%,jb%)<>32ANDFNn
b(ib%,jb%)<>46THENVDU31,ib%,jb%,46:ENDPR
OC
6140ENDPROC
6150:
6160DEFPROCqd
6170LOCALjb%,wb%
6180PRINTTAB(0,17);CHR$(128+ba%);"Pleas
e wait... ";
6190jb%=3
6200FORwb%=0TO9
6210$(eb%+379+wb%*41)=FNub(1,jb%)
6220jb%=jb%+1
6230IFjb%=8ORjb%=9THENjb%=10
6240NEXT
6250ENDPROC
6260:
6270DEFPROCrd
6280LOCALqa%
6290PROCq
6300PRINTTAB(0,2);CHR$(128+z%);"Use the
cursor keys to move around.";CHR$(128+z
%);"Press RETURN to move to the start"'C
HR$(128+z%);"of the next line. Type as n
ormal to";CHR$(128+z%);"enter informatio
n. ";
6310PRINT"DELETE will"'CHR$(128+z%);"de
lete the character before the"'CHR$(128+
z%);"cursor but will not close up the"'C
HR$(128+z%);"gap. Press ESCAPE when you
have"'CHR$(128+z%);"finished."
6320PRINTTAB(0,16);CHR$(128+aa%);"Press
ESCAPE to continue"'CHR$(128+aa%);"edit
ing...";
6330REPEAT
6340*FX21
6350UNTILGET=27
6360ENDPROC