8-Bit Software Online Conversion
Form Master - Listing
10REM Form Master
20REM By S.Johnson
30REM June 91
40MODE7
50VDU23;10,32;0;0;0;
60PROCheader
70w=0
80IF G=50 THEN MODE0:PROCtext
90IF G=32 THEN GOTO 40
100MODE1
110COLOUR2
120INPUT TAB(0,4)"Prize Value of Today
's Race ";pt
130INPUT TAB(0,7)"Number of Runners ";
r
140w=w+1
150IFw=1 THEN PROCinit
160PROCinput
170MODE7
180VDU23;10,32;0;0;0;:CLS
190 PRINTTAB(8,12)CHR$(141)CHR$(131);"
PLEASE WAIT"
200 PRINTTAB(8,13)CHR$(141)CHR$(131);"
PLEASE WAIT"
210PROCsort
220PROCresults
230C=INKEY(200)
240PRINTTAB(3,21)CHR$(131)CHR$(157)CHR
$(132)" Enter Another Race (Y/N)"SPC3CHR
$(156)
250G=GET
260IF G=89 OR G=121 THEN GOTO 100
270CLS:*BASIC
280END
290DEFPROCinput
300FOR f=1TOr
310t=0:x=0:y=25:x$="X":y$="X":pb=0
320COLOUR132
330CLS
340COLOUR3
350PRINTTAB(16,2)"HORSE ";f
360COLOUR2
370PRINTTAB(2,6)"1st form figure";TAB(
2,9)"2nd form figure"
380PRINTTAB(2,12)"Horse's Name"
390PRINTTAB(2,15)"Course & Distance"
400PRINTTAB(2,18)"Days since last run"
410PRINTTAB(2,21)"Won on todays going(
Y/N)"
420PRINTTAB(2,24)"Prize Value of lates
t run"
430INPUTTAB(28,6);x
440PROCscore
450a(f)=x
460PRINTTAB(28,6)" ";a(f)
470INPUTTAB(28,9);x
480PROCscore
490b(f)=x
500PRINTTAB(28,9)" ";b(f)
510x=0
520INPUTTAB(20,12);n$(f)
530IF LEN(n$(f))>15 THEN SOUND 0,-15,1
0,10:PRINTTAB(20,14)SPC25:GOTO520
540PRINTTAB(20,12)" ";n$(f)
550INPUTTAB(28,15);x$
560PROCscore
570cd$(f)=x$
580PRINTTAB(28,15)" ";cd$(f)
590x$="X"
600INPUTTAB(28,18);y
610PROCscore
620PRINTTAB(28,18)" ";y
630y=25
640INPUTTAB(28,21);y$
650PROCscore
660PRINTTAB(28,21)" ";y$
670y$="X"
680INPUTTAB(28,24);pb
690PROCscore
700t(f)=t
710COLOUR1:COLOUR132
720VDU23;10,32;0;0;0;
730PRINTTAB(4,30)"Do You Wish To Chang
e Any (Y/N)"
740G=GET
750VDU23;10,114;0;0;0;
760IF G=89 OR G=121 GOTO 310
770NEXTf
780ENDPROC
790DEFPROCscore
800IF x=1 THEN t=t+30
810IF x=2 THEN t=t+24
820IF x=3 THEN t=t+16
830IF x=4 THEN t=t+8
840IF x$="C" OR x$="c" THEN t=t+8
850IF x$="D" OR x$="d" THEN t=t+12
860IF x$="C,D" OR x$="c,d" THEN t=t+16
870IF x$="C&D" OR x$="c&d" THEN t=t+24
880IF y<21 THEN t=t+8
890IF y$="Y" OR y$="y" THEN t=t+8
900IF pt<pb THEN t=t+8:ENDPROC
910IF (pt-pb)<=1000 THEN t=t+4:ENDPROC
920ENDPROC
930DEFPROCsort
940LOCAL f
950LOCAL g
960FOR f=0TOr-1
970FOR g=f+1TOr
980 IF t(f)>t(g) THEN 1000
990 tf=t(f):af=a(f):bf=b(f):nf$=n$(f):
cdf$=cd$(f):t(f)=t(g):a(f)=a(g):b(f)=b(g
):n$(f)=n$(g):cd$(f)=cd$(g):t(g)=tf:a(g)
=af:b(g)=bf:n$(g)=nf$:cd$(g)=cdf$
1000NEXTg
1010NEXTf
1020ENDPROC
1030DEFPROCresults
1040C=INKEY(300)
1050CLS
1060VDU23;10,32;0;0;0;
1070PRINTTAB(1,21)CHR$(131)CHR$(157)CHR
$(132)" Send Ratings To Printer (Y/N)"SP
C3CHR$(156)
1080G=GET
1090IF G=89 OR G=121 THEN PROCprint
1100CLS
1110 PRINTTAB(10) CHR$(141)CHR$(129)CHR
$(157)CHR$(135)" RATINGS"SPC3CHR$(156)TA
B(10)CHR$(141)CHR$(129)CHR$(157)CHR$(135
)" RATINGS"SPC3CHR$(156)
1120FORf=0TOr-1
1130PRINTTAB(2,f+5)CHR$(131);a(f);b(f);
TAB(6,f+5)n$(f);TAB(23,f+5)cd$(f);TAB(31
,f+5)CHR$(134)t(f)
1140NEXTf
1150t(0)=0
1160ENDPROC
1170DEFPROCinit
1180DIM a(r),b(r),n$(r),cd$(r),t(r)
1190ENDPROC
1200DEFPROCprint
1210VDU2:PRINT':VDU3:A=INKEY(10):IF ADV
AL(-4)<63 PRINTTAB(6,22)CHR$(132)CHR$(15
7)CHR$(131)" Printer Not On Line"SPC3CHR
$(156):C=INKEY(250):GOTO 1040
1220VDU2
1230FORf=0TOr-1
1240PRINT a(f);b(f);" ";n$(f);SPC(23-L
EN(n$(f)));cd$(f);SPC(7-LEN(cd$(f)));t(f
)
1250NEXTf
1260VDU3
1270ENDPROC
1280 DEFPROCheader
1290VDU23;10,32;0;0;0;
1300 PRINTTAB(8,9)CHR$(141)CHR$(131);"1
. FORM MASTER"
1310 PRINTTAB(8,10)CHR$(141)CHR$(131);"
1. FORM MASTER"
1320 PRINTTAB(8,12)CHR$(141)CHR$(134);"
2. INSTRUCTIONS"
1330 PRINTTAB(8,13)CHR$(141)CHR$(134);"
2. INSTRUCTIONS"
1340G=GET
1350IF G<49 OR G>50 THEN GOTO 1340
1360ENDPROC
1370DEFPROCtext
1380VDU14
1390PRINT"Press SHIFT to scroll screen"
1400*TYPE FORMINS
1410G=GET
1420IF G=32 THEN CLS:ENDPROC
1430IF G<32 OR G>32 THEN GOTO 1410
1440ENDPROC