P731 CEEFAX 731 Mon 3 Nov 21:24/23 |B2201204|b17FBujldT|j13BBC|l43000|s—:8 |p÷e DISK NUMBER : DISKCA TEGORZ : DISC÷e FILENAMEFBUIL D-T÷e ÷e ÷e MACHINE  BBC B/B+/Master÷e BASIC AOSADOSPERIPHERALS Disc Drives÷e TAPE COMPATIBILITY No÷e ÷e ÷e LIVEVUMBER 20000-20290÷e NAME PROCF#B ld÷e AUTHOR JM REFERENCE RAR s÷e ÷e CLASSIFICATION DR om Access÷e DESCRIPTION B random access file of records÷e÷a÷a  ready for use bz the other procedures÷ e PARAM ETERS REQUIRED T n "y a set of÷e  DATA#T for this file.÷e DATA#T e maximum number of record needed. ÷e A ÷e M
P731 CEEFAX 731 Mon 3 Nov 21:12/27 |B2202204|b17FBuildT|j13BBC|l434EF|s—:8 |p 999.÷e DATA#T number of fields per record. Can÷e bj any number, but max of 20 is assume d÷e  ties.÷e DATAS 1-5 which proceeds each÷i  number and makes record numbers÷e  unique over several files.÷e DATA *,len*.. Set of integers giving the leno th of÷i  1st field÷e  number. Total÷e  st bj less than 255 as÷e  d as a basic string.÷e÷e PARAMETERS RETURNED GLOBALVAR IABLES REFERENCED None÷e GLOBAL VA R ABLER AFFECTED None÷e ÷e M ODE DEPENDENCE N OTHER MODULES CALLED NOTHER MODULES RELATED FINITFREAD F.WRJTJ÷e ÷e COMMENTS T is procedure is only used to initial|c
P731 CJEFAX 731 Mon 3 Nov 21:17/24 |B2203204|a17FBujldT|j13BBC|l4396F|s—:8 |ply÷e A ixed record format,÷e  th a 4 digit unique record÷e  r is used. An integer(last%) and a÷e text string with details of the recor d÷e  wed bz÷e  ole text string.÷i S ke some time to run, the÷e  numbers are displayed as they are÷e written to show progress.÷e  TYPICAL CALL AND LISTING÷e÷e 10 REM Build a new file÷e 20 REM File Name, Max number of records, No of fields per record, file#id÷e 30 DATA test,100,5,1 ÷e 40 REM Length of fields. Qst Field is record number and must bj length 4÷e 50 DATA 4,8,7,9,8÷e 60 :÷e 70 REST ORE 30÷e 80 PROCF#Build÷e 90 EVD÷e 100 :÷e40000 REM *********************** ******÷e20010 REM * REM Random File Build *÷e20030 R|c
P731 CEEFAX 731 Mon 3 Nov 21:12/40 |B2204204|aQ7FBuildT|i13BBC|l43DE5|s—:8 |pJM * (c) 1986 J. Meets *÷e20040 REM * Prestel Mailbox 707327277 *÷e20050 REM * REM ***********************÷e20070 :÷e20080 DEF PROCF#Build÷e20090 LOCAL i%,max%,jld *,rec#lin*,file%,F$,H$,h$,R$÷e20100 CLS÷ e20110 READ F$,max%,jld%,file%÷e20120 RE M Now store field lengths as text header ÷e20140 H$="":rec#len%=0÷e20150 FOR i%=1 TO fld%÷e20160 READ h$:rec#len%=rec#l en*+VAL(h$)÷e20170 H$=H$+RIGHT$(" "+h$ ,2)÷e20180 NEXT÷e20190 REM Write the r ecords to the file÷e20200 x%=OPENOUT F$÷ e20210 PRINT£x%,1000*file%+max%,H$÷e4022 0 FOR i%=0 TO max%÷e20230 PRINTTAB(10, 10)i%:REM Show record number being wrist en÷e20240 R$=STU$(file%*1000+i%)+TURIN G$(rec#len%-4,".")÷e20250 PRINT£x%,R$÷ e20260 NEXT÷e20270 CLOSE£x%÷e20280 END PROC÷e20290 :÷e|c
P731 CEEFA( 731 Mon 3 Nov 21:26/26 |B2201202|a16FBujld|j24BBBC332k|l43000|p ÷e 10REM Build a new file÷e 20REM Fi le Name, Max number of records, No of fi elds per record, jile#id÷e 30DATA test ,100,5,1÷e 40RJM Length of fields. 1st Field is record number and must bj ling th 4÷e 50DATA 4,8,7,9,8÷e 60:÷e 70 RESTORE 30÷e 80PROCF#Build÷e 90END÷e 100:÷e20000REM *********************** ******÷e20010REM * *÷e20020REM * Random File Build *÷e20030REM * (c) 1986 J. Meets *÷i20040REM * Prestel Mailbox 70732 7277 *÷e400u0REM * *÷e200v0RJM *********************** ******÷e20070:÷e20080DEF PROCF#Build÷e20 090LOCAL i%,max%,fld*,rec#lin%,file%,F$, H$,h$,R$÷e20100CLS÷e20110READ F$,max%,fl d%,file%÷e40120REM Now store field lengt hs as text header÷e20140H$="":rec#lin%=0 ÷e201u0FOR i%=1 TO fld%÷e20160RJAD h$:re c#len%=rec#len%+VAL(h$)÷e20170H$=H$+SIGH T$(" "+h$,2)÷i20180NEXT÷e20190REM Wr|c
P731 CJEFA( 731 Mon 3 Nov 21:21/38 |B2202202|a16FBuild|i24BBBC332k|l4334F|p ire the records to the file÷e20200x%=OPE NOUS F$÷e20210PRINT£x%,1000*file%+max%,H $÷e20220FOR i%=0 TO max%÷e20230PRINTTAB( 10,10)i%:REM Show record number being wr itten÷i40240R$=STU$(file%*1000+i%)+STRJN G$(rec#len%-4,".")÷e20250PRINT£x%,R$÷e20 260NEXT÷e40270CLOSE£x%÷e20280ENDPROC÷e20 290:÷e|c