home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / MBUG / MBUG061.ARC / DCLEDGER.ASC < prev    next >
Text File  |  1979-12-31  |  13KB  |  367 lines

  1.  
  2. 00001POKE140,1
  3. 00002GOSUB357
  4. 00003IN#0:OUT#0
  5. 00004N=8:IFB0$(0)=""THENLETN=2ELSEIFC=1THENLETN=4
  6. 00005K0$=KEY$:K4$="":I=0:Q=0:IFC<3ANDN=8THENLETN=5
  7. 00006GOSUB322:INVERSE:CURS28,4:PRINT" MENU ":NORMAL
  8. 00007PRINT\SPC(14)"Create ..... 1";
  9. 00008PRINTSPC(4)"Load ....... 2":IFN=2THEN16
  10. 00009PRINTSPC(14)"Enter ...... 3";
  11. 00010PRINTSPC(4)"Save ....... 4":IFN=4THEN16
  12. 00011PRINTSPC(14)"Delete ..... 5";:IFN=5THEN16
  13. 00012PRINTSPC(4)"Sort ....... 6"
  14. 00013PRINTSPC(14)"Print ...... 7";
  15. 00014PRINTSPC(4)"New Base ... 8"
  16. 00015IFC=V+1THENPRINT\SPC(21)"*** LEDGER FULL ***"
  17. 00016K2$="Select Menu Option":GOSUB246
  18. 00017X=INT(VAL(K0$)):IFX=0ORX>NTHEN16
  19. 00018PLAY22,1:ONXGOTO68,33,86,123,142,22,154,222
  20. 00019 REM
  21. 00020 REM sort routine
  22. 00021 REM
  23. 00022GOSUB252:IFK1$="N"ORS=1THEN3
  24. 00023X=0:GOSUB341
  25. 00024FORX=1TOC-1:GOSUB316:A1(X)=F4:NEXTX
  26. 00025FORX=1TOC-2:GOSUB341:FORM=X+1TOC-1
  27. 00026IFA1(M)=>A1(X)THEN29
  28. 00027K0$=A0$(M):A0$(M)=A0$(X):A0$(X)=K0$
  29. 00028F1=A1(M):A1(M)=A1(X):A1(X)=F1
  30. 00029NEXTM:NEXTX:S=1:GOTO82
  31. 00030 REM
  32. 00031 REM  load
  33. 00032 REM
  34. 00033N=3:IFC>1ANDC<V+1THENLETN=4
  35. 00034 K5$="LOAD":GOSUB231:IFK2$=""THEN82
  36. 00035ONERRORGOTO239:OPEN"I",6,K5$+".LGR":CLOSE6
  37. 00036ONERRORGOTO0:GOSUB348:IFO=0THENDISKRESET"A":GOTO3
  38. 00037OPEN"I",6,K5$+".LGR":IN#6ON:OUT#0OFF
  39. 00038INPUTK1$,D,H,X,Y,Z,E
  40. 00039IN#0:OUT#0
  41. 00040IFO=3ANDH<3THENLETO=0
  42. 00041IFO=1ANDH=2THENLETO=0
  43. 00042IFO>1ANDH=1THENLETO=0
  44. 00043K0$="":J=1:L=D-1:IFO<4THEN46
  45. 00044J=C:L=L+C:C=L:S=0:K0$=" - Merge"
  46. 00045IFC>V+1THENLETC=V+1:K0$=K0$+" (Part only)"
  47. 00046IFO=2ORO=3THENLETC=D:S=Z
  48. 00047IFO=1ORO=3THENLETB0$(0)=K1$:P=X:R=Y:T=E
  49. 00048IFO=1ANDC=0THENLETC=1
  50. 00049K1$=K1$+K0$:CURS0,12:PRINT[A64 32]
  51. 00050CURS(62-LEN(K1$))/2,12:PRINTK1$:CURS26,13
  52. 00051IFH=1ORO=1ORC=1THENPRINT"  (Base)":GOTO54
  53. 00052IF(H=2ORO=2)ANDC>1THENPRINT"  (File)":GOTO54
  54. 00053IFS=0ANDC>1ANDO>1THENPRINT"(Unsorted)"
  55. 00054IFO=0THEN82ELSELETN=X:IFY>XTHENLETN=Y
  56. 00055CURS0:PLAY0,10:IN#6ON:OUT#0:OUT#0OFF
  57. 00056FORX=1TON
  58. 00057IF(O=2ORO=4)ANDH=3THENINPUTK0$,K0$,F1,F1
  59. 00058IFO=1ORO=3THENINPUTB0$(X),B1$(X),B2(X),B3(X)
  60. 00059NEXTX:IFO=1THEN61ELSEFORX=JTOCSTEP3
  61. 00060INPUTA0$(X),A0$(X+1),A0$(X+2):NEXTX
  62. 00061IFC<V+1ANDO>1THENGOSUB360
  63. 00062Y=P+1:IFP<20THENGOSUB361
  64. 00063Y=R+1:IFR<20THENGOSUB362
  65. 00064IN#0:OUT#0:CLOSE6:DISKRESET"A":GOTO82
  66. 00065REM
  67. 00066 REM  create
  68. 00067 REM
  69. 00068GOSUB355:IFK1$="N"THEN3
  70. 00069G=24:K2$="File Title":GOSUB322:GOSUB274:B0$(0)=K1$:I=1
  71. 00070GOSUB328:P=P+1:GOSUB269:B0$(P)=K1$:K3$=K1$
  72. 00071IFK3$=""ANDP=1THENLETB0$(1)="Payment":GOTO73
  73. 00072IFK3$=""THENLETP=P-1:GOTO74
  74. 00073GOSUB257:B2(P)=F3:IFP<20ANDK3$<>""THEN70
  75. 00074PLAY22,1
  76. 00075GOSUB331:R=R+1:GOSUB269:B1$(R)=K1$:K3$=K1$
  77. 00076IFK3$=""ANDR=1THENLETB1$(1)="Receipt":GOTO78
  78. 00077IFK3$=""THENLETR=R-1:GOTO79
  79. 00078GOSUB257:B3(R)=F3:IFR<20ANDK3$<>""THEN75
  80. 00079PLAY22,1:T=0:FORX=1TO20:IFB2(X)>0THENLETT=T+1
  81. 00080IFB3(X)>0THENLETT=T+1
  82. 00081NEXTX:C=1:K3$="":GOTO3
  83. 00082CURS0:PLAY22,1;0,5:GOTO3
  84. 00083REM
  85. 00084 REM  enter
  86. 00085 REM
  87. 00086IFC>VTHEN3
  88. 00087S=0:A0$(C)="":M=C:GOSUB292:I=C-1:G=2
  89. 00088IFC>1THENLETX=C-1:GOSUB316
  90. 00089K2$="Day":GOSUB274:IFK1$=""ANDF1>0THEN95
  91. 00090F1=VAL(K1$):IFF1=0ORF1>31THEN89
  92. 00091K2$="Month":GOSUB274:IFK1$=""ANDF2>0THEN95
  93. 00092F2=VAL(K1$):IFF2=0ORF2>12THEN91
  94. 00093K2$="Year":GOSUB274:IFK1$=""ANDF3>0THEN95
  95. 00094F3=VAL(K1$):IFF3=0THEN93
  96. 00095RESTORE:FORX=1TOINT(F2):READZ:NEXTX
  97. 00096DATA 31,28,31,30,31,30,31,31,30,31,30,31
  98. 00097IFFRACT(F3/4)=0ANDF2=2THENLETZ=29
  99. 00098IFINT(F1)<=ZTHEN100
  100. 00099CURS1,16:PRINT"*** DATE ERROR ***";:PLAY10,12:GOTO89
  101. 00100K0$=STR$(INT(F1)):K1$=K0$(;2)+"/"
  102. 00101K0$=STR$(INT(F2)):K1$=K1$+K0$(;2)+"/"
  103. 00102K0$=STR$(INT(F3)):IFF3<10THENLETK1$=K1$+"0"
  104. 00103K1$=K1$+K0$(;2):GOSUB291:K2$="From/To":G=16:I=1
  105. 00104GOSUB274:IFK1$=""THENLETK1$="Paid"
  106. 00105GOSUB291:K2$="Cheque/Receipt No.":G=7:GOSUB274
  107. 00106IFX=2THENLETK1$="B/card"ELSEIFX=1THENLETK1$="Cash"
  108. 00107GOSUB291:K2$="Receipt (R) or Payment (P)"
  109. 00108GOSUB246:IFK1$<>"R"ANDK1$<>"P"THEN108
  110. 00109GOSUB309:GOSUB322
  111. 00110IFK1$<>"P"THEN112
  112. 00111M=P:IFM=1THENLETK1$="A":GOTO114ELSEGOSUB328:GOTO113
  113. 00112M=R:IFM=1THENLETK1$="A":GOTO114ELSEGOSUB331
  114. 00113K2$="Category":GOSUB246:X=X-64:IFX<1ORX>MTHEN113
  115. 00114GOSUB291
  116. 00115G=9:I=0:K2$="Amount":GOSUB274:GOSUB262:IFX=1THEN115
  117. 00116GOSUB291:K2$="Next=<CR>  Menu=M  Re-do=R ":I=1
  118. 00117GOSUB246:IFK1$="R"THEN87
  119. 00118IFK1$<>"M"ANDX<>128THEN117
  120. 00119C=C+1:IFX=128THEN86ELSE3
  121. 00120 REM
  122. 00121 REM  save
  123. 00122 REM
  124. 00123N=3:IFC=1THENLETN=1
  125. 00124K5$=SAVE":GOSUB231:IFK2$=""THEN82
  126. 00125Q=0:ONERRORGOTO126:OPEN"I",6,K5$+".LGR":Q=1
  127. 00126ONERRORGOTO0:IN#0:OUT#0:CLOSE6:IFQ=0THEN129
  128. 00127K2$="OVERWRITE "+K5$+" (Y/N)":GOSUB246
  129. 00128IFK1$="N"THEN124ELSEIFK1$<>"Y"THEN127
  130. 00129GOSUB348:IFH=0THENDISKRESET"A":GOTO3
  131. 00130 K0$=B0$(0):N=P:IFR>PTHENLETN=R
  132. 00131CURS0,12:PRINT[A24 32];"SAVING ";K5$;[A33 32]:CURS0
  133. 00132 OPEN"O",6,K5$+".LGR":OUT#6
  134. 00133PRINT"''";K0$;"'',";C;",";H;",";P;",";R;",";S;",";T
  135. 00134IFH=2THEN136ELSEFORX=1TON
  136. 00135PRINTB0$(X);",";B1$(X);",";B2(X);",";B3(X):NEXTX
  137. 00136IFC<2ORH=1THEN64
  138. 00137FORX=1TOCSTEP3
  139. 00138PRINTA0$(X);",";A0$(X+1);",";A0$(X+2):NEXTX:GOTO64
  140. 00139 REM
  141. 00140 REM   DELETE
  142. 00141 REM
  143. 00142G=3:K3$=" file to be deleted":K2$="First"+K3$
  144. 00143GOSUB274:O=INT(VAL(K1$)):IFO<1ORO=>CTHEN142
  145. 00144M=O:GOSUB292:GOSUB252:IFK1$="N"THEN3
  146. 00145G=3:K2$="Last"+K3$+" - or <CR>":I=1:GOSUB274
  147. 00146L=INT(VAL(K1$)):IFK1$=""THENLETL=O
  148. 00147I=0:IFL<OORL=>CTHEN145ELSEIFL=OTHEN149
  149. 00148M=L:GOSUB292:GOSUB252:IFK1$="N"THEN145
  150. 00149K3$="":Z=L-O+1:X=0:GOSUB341:FORX=L+1TOC
  151. 00150A0$(O)=A0$(X):O=O+1:NEXTX:C=C-Z:GOSUB360:GOTO82
  152. 00151 REM
  153. 00152 REM   PRINT
  154. 00153 REM
  155. 00154G=20:I=1:H=1:K2$="String search":GOSUB274:K4$=K1$
  156. 00155IFASC(K4$)=35THENLETH=INT(VAL(K4$(;2))):K4$="#"
  157. 00156IFH=0ORH>C-2THEN154
  158. 00157K2$="Screen (S) or Printer (P)":GOSUB246
  159. 00158L=12:IFK1$="S"THEN167ELSEIFK1$<>"P"THEN3
  160. 00159GOSUB322:K2$="PRINTER Type:":PRINT\\SPC(15);K2$
  161. 00160PRINT\SPC(20)"Parallel      -  Key 1"
  162. 00161PRINTSPC(20)"Serial 300bd  -  Key 2"
  163. 00162PRINTSPC(20)"Serial 1200bd -  Key 3"
  164. 00163PRINTSPC(20)"Abort -  any other Key"
  165. 00164GOSUB246:X=X-48:IFX<0ORX>4THEN3
  166. 00165L=57:Q=X:IFX>1THENLETQ=X+2
  167. 00166GOSUB245:OUT#0:OUT#0OFF:OUT#QON:PRINT
  168. 00167FORX=1TO20:B4(X)=B2(X):B5(X)=B3(X):NEXTX
  169. 00168D=0:F3=0:F4=1:O=T:U=0:W=0:E=C+P+R+T+4
  170. 00169IFK4$<>""THENLETE=C:O=1
  171. 00170G=1:K0$=KEY$:IFK0$=""THEN173ELSEPLAY22,2
  172. 00171IFK0$="A"ORK0$="a"THEN216
  173. 00172K1$=KEY$:IFK1$=""THEN172
  174. 00173IFD>0THEN184ELSEIFQ>0THEN177
  175. 00174 REM
  176. 00175FORX=3TO14:CURS1,X:PRINT[A64 32]:NEXTX:CURS1,3:GOTO184
  177. 00176REM
  178. 00177D=2:PRINT"LEDGER: ";B0$(0);SPC(26-LEN(B0$(0)));
  179. 00178K2$=" to ":IFS=0THEN181
  180. 00179K0$=A0$(1):GOSUB310:K2$=K1$+K2$
  181. 00180K0$=A0$(C-1):GOSUB310:K2$=K2$+K1$:PRINTK2$;
  182. 00181PRINTSPC(34-LEN(K2$));"Page ";F4:F4=F4+1
  183. 00182PRINT"No.     DATE    TRANSACTION";SPC(17);
  184. 00183PRINT"CLASS";SPC(16);"AMOUNT ($)":PRINT[A7 45]
  185. 00184IFO=0ORK4$<>""THEN194
  186. 00185U=U+1:IFU>PTHEN188
  187. 00186F1=B2(U):IFF1=0THEN185
  188. 00187K0$=B0$(U):X=LEN(K0$):Z=0:GOTO190
  189. 00188W=W+1:F1=B3(W):IFF1=0THEN188
  190. 00189K0$=B1$(W):X=LEN(K0$):Z=11
  191. 00190IFO=TTHENPRINT" CARRIED FORWARD:   ";ELSEPRINTSPC(20);
  192. 00191IFQ>0THENPRINTSPC(22);K0$;SPC(27-X-Z);
  193. 00192IFQ=0THENPRINTK0$;SPC(33-X-Z);
  194. 00193O=O-1:PRINT[F10.2 F1]:GOTO211
  195. 00194IFK4$=""ORK4$="#"ORO<>1THEN196
  196. 00195PRINT\SPC(10);"SEARCH; ";K4$\:O=0:G=3:GOTO211
  197. 00196M=H:IFK4$=""THENLETM=H-T
  198. 00197IFM<1ORM>=CTHEN200ELSEGOSUB293
  199. 00198IFM=0THENLETB5(N)=B5(N)+F1ELSELETB4(N)=B4(N)+F1
  200. 00199GOTO211
  201. 00200IFK4$<>""THEN211
  202. 00201M=M-C:IFM=0THENPRINT:GOTO211
  203. 00202IFM>PTHEN205ELSEIFB4(M)=0THEN215
  204. 00203PRINTSPC(20);B0$(M);SPC(22-LEN(B0$(M)));[F10.2 B4(M)]
  205. 00204F3=F3-B4(M):GOTO211
  206. 00205M=M-P:IFM>RTHEN208ELSEIFB5(M)=0THEN215
  207. 00206PRINTSPC(20);B1$(M);SPC(22-LEN(B1$(M)));[F10.2 B5(M)]
  208. 00207F3=F3+B5(M):GOTO211
  209. 00208X=67:IFQ=0THENLETX=51
  210. 00209IFH=EORH=E-2THENPRINTSPC(X+2);[A10 45]:G=1
  211. 00210IFH=E-1THENPRINTSPC(X);[F11.2 F3]:G=1
  212. 00211D=D+G:IFD<LTHEN215
  213. 00212 REM
  214. 00213IFQ>0THENPRINT\\\\\\\
  215. 00214D=0:IFQ>0THEN215ELSEGOSUB245:IFK0$="A"THEN218
  216. 00215H=H+1:IFH<=ETHEN170
  217. 00216IFQ>0THENOUT#QOFF:GOTO218
  218. 00217IFK0$<>"A"ANDK0$<>"a"THENGOSUB245
  219. 00218Q=0:GOTO3
  220. 00219 REM
  221. 00220 REM    NEW BASE
  222. 00221 REM
  223. 00222GOSUB252:IFK1$="N"THEN3
  224. 00223I=1:G=24:K2$="New Title":GOSUB274:IFK1$<>""THENLETB0$(0)=K1$
  225. 00224FORY=1TOC-1:K0$=A0$(Y):X=SEARCH(K0$,"|",3):GOSUB311
  226. 00225O=ASC(K0$):GOSUB310:Z=ASC(K0$)-64:GOSUB310:F1=VAL(K0$)
  227. 00226IFO=80THENLETB2(Z)=B2(Z)+F1ELSELETB3(Z)=B3(Z)+F1
  228. 00227X=Y:GOSUB341:NEXTY:C=1:GOSUB360:GOTO79
  229. 00228 REM
  230. 00229 REM  DRIVE/FILENAME SELECTION
  231. 00230 REM
  232. 00231POKE257,1:K2$="Select Drive? (A/B/C)":GOSUB246
  233. 00232 IFX<65ORX>67THENLETK2$="":GOTO235
  234. 00233DISKRESETK1$:K2$=K5$+": Filename":G=8:GOSUB274
  235. 00234 K5$=K1$
  236. 00235POKE257,0:RETURN
  237. 00236 REM
  238. 00237 REM   INVALID FILE
  239. 00238 REM
  240. 00239ONERRORGOTO0:IN#0:OUT#0:CLOSE6:CURS1,16
  241. 00240 PRINT[A63 32];CURS22,16:PRINT"<<< NO SUCH FILE >>>"
  242. 00241 CURS0:PLAY0,20:DISKRESET"A":K5$="":GOTO82
  243. 00242 REM
  244. 00243 REM   KEY TO CONTINUE
  245. 00244 REM
  246. 00245K2$="KEY to Continue"
  247. 00246G=1:GOSUB274:X=ASC(K1$)
  248. 00247IFX>96ANDX<123THENLETX=X-32:K1$=CHR$(X)
  249. 00248RETURN
  250. 00249 REM
  251. 00250 REM   SURE Y/N
  252. 00251 REM
  253. 00252K2$="Sure (Y/N)":GOSUB246:IFK1$<>"N"ANDK1$<>"Y"THEN252
  254. 00253RETURN
  255. 00254 REM
  256. 00255 REM     PREVIOUS BALANCE
  257. 00256 REM
  258. 00257G=9:K2$="Balance Forward":GOSUB274:GOSUB262
  259. 00258IFX=1THEN257ELSERETURN
  260. 00259 REM
  261. 00260 REM   MONEY INPUT
  262. 00261 REM
  263. 00262X=1:F1=VAL(K1$):IFF1<=0ANDI=0ORF1=>1000000THEN265
  264. 00263X=0:F2=FRACT(F1):F3=F1-F2+FLT(INT(F2*100))/100
  265. 00264K1$=STR$(F3):K1$=K1$(;2)
  266. 00265RETURN
  267. 00266 REM
  268. 00267 REM       CATEGORY
  269. 00268 REM
  270. 00269G=12:K2$="Category"
  271. 00270 REM
  272. 00271 REM     MAIN INPUT
  273. 00272 REM G=No of chars, I=Null allowed, K2$=Prompt
  274. 00273 REM
  275. 00274GOSUB323:Y=LEN(K2$):CURS1,15:PRINT[A64 45][A63 32];
  276. 00275X=V+1-C:IFX>VTHENLETX=V
  277. 00276CURS1,16:PRINTK2$;:CURS52,16:PRINTINT(FRE($));" :";X;
  278. 00277CURSY+3,16:Z=0:K1$="":FORX=1TOG:PRINT"*";:NEXTX
  279. 00278CURSY+1,16:PRINT"? ";
  280. 00279K0$=KEY$:X=ASC(K0$):IFX=124ORX=128THEN279
  281. 00280IFX=8ORX=127THEN285ELSEIFX>13THEN283
  282. 00281IFZ>0THENCURS0:RETURN
  283. 00282IFI>0THENLETK1$="":RETURNELSE279
  284. 00283Z=Z+1:CURSY+Z+2,16:PRINTK0$;
  285. 00284K1$=K1$+K0$:IFZ=GTHENRETURNELSE279
  286. 00285K0$=K1$(;1,LEN(K1$)-1):K1$=K0$
  287. 00286IFZ>0THENCURSY+Z+2,16:PRINT"*";:CURSY+2,16:Z=Z-1
  288. 00287GOTO279
  289. 00288 REM
  290. 00289 REM     File Entry
  291. 00290 REM
  292. 00291M=C:GOSUB309
  293. 00292GOSUB322:PRINT"FILE:"
  294. 00293IFK4$=""ORK4$="#"THEN295
  295. 00294K0$=A0$(M):IFSEARCH(K0$,K4$)=0THENLETG=0:RETURN
  296. 00295K0$=STR$(M)+".":K0$=K0$(;2):X=LEN(K0$)
  297. 00296PRINTK0$;SPC(4-X);:K0$=A0$(M):GOSUB310
  298. 00297PRINTSPC(9-LEN(K1$));K1$;" ";:IFQ>0THENPRINT" ";
  299. 00298GOSUB310:PRINTK1$;SPC(18-X);
  300. 00299GOSUB310:PRINTK1$;SPC(9-X);
  301. 00300GOSUB310:M=0:IFK1$="P"THENLETM=11
  302. 00301IFQ=0THENPRINTK1$;" ";
  303. 00302GOSUB310:N=ASC(K1$)-64:K2$=B0$(N):IFM=0THENLETK2$=B1$(N)
  304. 00303IFQ>0THENLETX=LEN(K2$):PRINTK2$;SPC(16-X);ELSEPRINTK1$;
  305. 00304GOSUB310:F1=VAL(K1$):IFF1>0THENPRINTSPC(M);[F10.2 F1]
  306. 00305RETURN
  307. 00306 REM
  308. 00307 REM   Extract File
  309. 00308 REM
  310. 00309A0$(C)=A0$(C)+K1$+"|":RETURN
  311. 00310K1$="":X=SEARCH(K0$,"|"):IFX=0THENRETURN
  312. 00311K1$=K0$(;1,X-1):K0$=K0$(;X+1):IFQ>0THENLETX=X-1
  313. 00312RETURN
  314. 00313 REM
  315. 00314 REM   Extract Data Variables
  316. 00315 REM
  317. 00316K1$=A0$(X):F1=VAL(K1$):Y=SEARCH(K1$,"/")+1:K1$=K1$(;Y)
  318. 00317F2=VAL(K1$):Y=SEARCH(K1$,"/")+1:K1$=K1$(;Y)
  319. 00318F3=VAL(K1$):F4=100*F3+F2+F1/100:RETURN
  320. 00319 REM
  321. 00320 REM      Print Screen Heading
  322. 00321 REM
  323. 00322CLS:PRINTK5$;:CURS53,1:PRINT"by L.R. Ford";
  324. 00323CURS17,1:INVERSE:PRINT" * Dreamcards LedgerMaster * "
  325. 00324NORMAL:PRINT[A64 45];:RETURN
  326. 00325 REM
  327. 00326 REM    print BASE sub
  328. 00327 REM
  329. 00328GOSUB322:PRINT"PAYMENT CATEGORIES:  (";B0$(0);")":K2$="Category"
  330. 00329IFP=0THENRETURN
  331. 00330FORX=1TOP:K0$=B0$(X):F1=B2(X):GOSUB334:NEXTX:RETURN
  332. 00331GOSUB322:PRINT"RECEIPTS CATEGORIES:  (";B0$(0);")"
  333. 00332IFR=0THENRETURN
  334. 00333FORX=1TOR:K0$=B1$(X):F1=B3(X):GOSUB334:NEXTX:RETURN
  335. 00334J=X+3:K=3:IFX>10THENLETJ=J-10:K=35
  336. 00335CURSK,J:PRINTCHR$(X+64);". ";K0$;SPC(13-LEN(K0$));
  337. 00336IFF1>0THENPRINT[F10.2 F1]
  338. 00337RETURN
  339. 00338 REM
  340. 00339 REM   counter
  341. 00340 REM
  342. 00341IFX>1THEN343
  343. 00342CURS1,12:PRINT[A26 32]"* WAIT *"[A92 32]
  344. 00343IFX>0THENCURS28,13:PRINT[I4 X];
  345. 00344CURS0:RETURN
  346. 00345 REM
  347. 00346 REM    save/load type sub
  348. 00347 REM
  349. 00348K2$="Base (1)":IFN>2THENLETK2$=K2$+", Files (2), All (3)"
  350. 00349IFN>3THENLETK2$=K2$+", Merge (4)"
  351. 00350GOSUB246:H=INT(VAL(K1$)):IFH>NTHENLETH=0
  352. 00351O=H:RETURN
  353. 00352 REM
  354. 00353 REM     Initialise Arrays
  355. 00354 REM
  356. 00355IFC=0THEN357
  357. 00356GOSUB252:IFK1$="N"THENRETURN
  358. 00357CLEAR:K5$="":V=230:STRS(V*51+1400)
  359. 00358DIMA0(V+2),A1(V+2),B0(20),B1(20),B2(20)
  360. 00359DIMB3(20),B4(20),B5(20):GOSUB361:GOSUB362
  361. 00360FORX=CTOV+2:A0$(X)="":NEXTX:K1$="":RETURN
  362. 00361FORX=YTO20:B0$(X)="":B2(X)=0:NEXTX:RETURN
  363. 00362FORX=YTO20:B1$(X)="":B3(X)=0:NEXTX:RETURN
  364. 
  365. (X)="":NEXTX:K1$="":RETURN
  366. 00361FORX=YTO20:B0$(X)="":B2(X)=0:NEXTX:RETURN
  367. 00362FORX=YTO2