-
Notifications
You must be signed in to change notification settings - Fork 11
/
A16_Huishoudbudget.bc3
322 lines (321 loc) · 9.58 KB
/
A16_Huishoudbudget.bc3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
1000 A=200:GOTO20:REM HUISHOUDBUDGET
1010 DIMSA$(2,100),IU$(2),NS(2)
1020 NS(1)=1:NS(2)=1
1030 IU$(1)="INKOMSTEN":IU$(2)="UITGAVEN"
1100 REM MENU
1110 GOSUB100:PRINT" MENU"
1120 PRINT:PRINT" 1 - INVOER"
1130 PRINT:PRINT" 2 - VERANDEREN"
1140 PRINT:PRINT" 3 - UITVOER"
1150 PRINT:PRINT
1160 PRINT:PRINT" 0 - STOP"
1170 MX=3:GOSUB7010:IFCH=0 THEN950
1180 GOSUB100:C1=CH
1190 ONCH GOTO2010,4010,5010
2000 REM INVOER
2010 PRINT" INVOERMENU"
2020 PRINT:PRINT" 1 - INVOEREN VAN ";IU$(1)
2030 PRINT:PRINT" 2 - INVOEREN VAN ";IU$(2)
2040 PRINT:PRINT" 3 - LAAD VAN DISK"
2050 PRINT:PRINT
2060 PRINT:PRINT" 0 - HOOFDMENU"
2070 MX=3:GOSUB7010:IFCH=0 THEN1110
2080 IFCH=3 THEN GOSUB9010:GOTO1110
2090 IU=CH:RE=1
2100 IFNS(IU)>100 THENPRINT"GEHEUGEN VOL":GOTO2290
2110 VE=1:HO=0:GOSUB110
2120 PRINT"INVOER ";IU$(IU);"POST ";NS(IU);
2130 GOSUB2710
2140 IFIN$="@" THEN2290
2150 SA$(IU,NS(IU))=SA$(IU,NS(IU))+IN$
2160 VE=15:HO=0:GOSUB110
2170 PRINTNS(IU);" ";SA$(IU,NS(IU))
2180 GOSUB2810
2190 SA$(IU,NS(IU))=SA$(IU,NS(IU))+SR$
2200 VE=15:HO=0:GOSUB110
2210 PRINTNS(IU);" ";SA$(IU,NS(IU))
2220 VE=16:HO=0:GOSUB110
2230 PRINTIU$(IU);" PER:"
2240 GOSUB3010
2250 SA$(IU,NS(IU))=SA$(IU,NS(IU))+"/"+IN$
2260 VE=15:HO=0:GOSUB110
2270 PRINTNS(IU);" ";SA$(IU,NS(IU))
2280 NS(IU)=NS(IU)+1:RE=RE+1
2290 VE=23:HO=0:GOSUB110
2300 PRINT"M=Menu V=Volgende P=Projectie";
2310 GOSUB200:IFIN=0 THEN2310
2320 IF(IN<>77)AND(IN<>80)AND(IN<>86)THEN2310
2330 IFIN=80 THEN2510
2340 IF(IN=86)AND(NS(IU)<=100)THEN GOSUB100:GOTO2100
2350 GOTO1110
2500 REM SCHERM PROJECTIE
2510 GOSUB100
2520 PRINT"DE VOLGENDE ";IU$(IU);" ZIJN INGEVOERD:"
2530 RE=2:HO=0:I=1
2540 VE=RE:GOSUB110:PRINTI;" ";SA$(IU,I)
2550 IF(RE=18)AND(C1=2)THEN4090
2560 IF(RE=18)AND(C1=1)THEN GOSUB2610
2570 RE=RE+1:I=I+1:IFI<NS(IU)THEN2540
2580 IFC1=1 THEN2290
2590 GOTO4090
2600 REM pagina vol
2610 CL=0:GOSUB7510
2620 HO=0:FORVE=2 TO23:GOSUB110
2630 PRINT" ";
2640 NEXTVE
2650 RE=1:RETURN
2700 REM INVOER INKOMSTEN/UITGAVEN POST
2710 VE=20:HO=0:GOSUB110
2720 PRINT"NAAM ";IU$(IU);"POST :";:GOSUB120
2730 GOSUB110:PRINT" ............";
2740 GOSUB110:INPUTIN$
2750 IFIN$="@" THEN2790
2760 IF(LEN(IN$)=0)OR(LEN(IN$)>12)THEN2730
2770 IFLEN(IN$)<12 THENIN$=IN$+" ":GOTO2770
2790 RETURN
2800 REM INVOER BEDRAG 8 CIJF/2 DEC
2810 VE=20:HO=0:GOSUB110
2820 PRINT"VOER HET BEDRAG IN : fl ";:GOSUB120
2830 GOSUB110:PRINT" ";
2840 GOSUB110:INPUTIN$
2850 SR=VAL(IN$):GOSUB300:CT=8:CN=2:GOSUB310
2860 GOSUB110:PRINT" ";
2870 GOSUB110:PRINTSR$:RETURN
3000 REM BEPAAL TERMIJN EN DELER
3010 VE=19:HO=0:GOSUB110
3020 PRINT"[J]aar [H]alfjaar "
3030 PRINT"[K]wartaal [M]aand "
3040 PRINT"[T]weewekelijks [W]eek "
3050 IFC1=3 THENPRINT"[D]ag "
3060 VE=23:HO=0:GOSUB110
3070 PRINT"MAAK UW KEUZE";
3080 GOSUB200:IFIN=0 THEN3080
3090 SR$=IN$:GOSUB330:IN$=SR$
3100 Q$="JHKMTW":IFC1=3 THENQ$=Q$+"D"
3110 GD=0:FORI=1 TOLEN(Q$)
3120 IFIN$=MID$(Q$,I,1)THENGD=I:I=LEN(Q$)
3130 NEXTI
3140 IFGD=0 THEN GOSUB250:GOTO3080
3150 IFIN$="J" THENQ$="jaar":DL=1
3160 IFIN$="H" THENQ$="halfjaar":DL=2
3170 IFIN$="K" THENQ$="kwartaal":DL=4
3180 IFIN$="M" THENQ$="maand":DL=12
3190 IFIN$="T" THENQ$="twee weken":DL=26
3200 IFIN$="W" THENQ$="week":DL=52
3210 IFIN$="D" THENQ$="dag":DL=365
3220 HO=0:FORVE=16 TO21:GOSUB110
3230 PRINT" ";
3240 NEXTVE:RETURN
4000 REM wijzigen
4010 PRINT" WIJZIGINGSMENU"
4020 PRINT:PRINT" 1 - ";IU$(1)
4030 PRINT:PRINT" 2 - ";IU$(2)
4040 PRINT:PRINT
4050 PRINT:PRINT" 0 - HOOFDMENU"
4060 MX=2:GOSUB7010:IFCH=0 THEN1110
4070 IU=CH
4080 GOTO2510
4090 VE=22:HO=0:GOSUB110
4100 PRINT"[M]enu ";
4110 IFNS(IU)>1 THENPRINT"[W]ijzig ";
4120 IFI<NS(IU)THENPRINT"[V]olgende pagina ";
4130 GOSUB210
4140 IF(IN<>77)AND(NS(IU)>1)THEN4170
4150 IFI<NS(IU)THENI=NS(IU)
4160 GOTO1110
4170 IFIN=87 THEN4210
4180 IFIN<>86 THEN4130
4190 IFI>=NS(IU)THEN4130
4200 GOSUB2620:GOTO2570
4210 IFNS(IU)=1 THEN4130
4220 GOSUB110:PRINT"Voer het te wijzigen nummer in :";
4230 GOSUB120
4240 GOSUB110:PRINT" ";
4250 GOSUB110:INPUTIN$:NR=VAL(IN$)
4260 IF(NR<1)OR(NR>NS(IU)-1)THEN4240
4270 HO=0:GOSUB110
4280 PRINT" ";
4290 VE=18:HO=0:GOSUB110
4300 PRINT" ";LEFT$(SA$(IU,NR),12);
4310 H1$="":GOSUB2710
4320 IFIN$="@" THEN4400
4330 H1$=H1$+IN$
4340 GOSUB2810
4350 H1$=H1$+SR$
4360 VE=16:HO=0:GOSUB110
4370 PRINTIU$(IU);" PER:"
4380 GOSUB3010
4390 H1$=H1$+"/"+IN$:SA$(IU,NR)=H1$
4400 VE=18:HO=0:GOSUB110
4410 PRINTSA$(IU,NR);
4420 GOTO4080
5000 REM UITVOER
5010 PRINT"UITVOER VAN GEGEVENS"
5020 PRINT:PRINT" 1 - Scherm"
5030 PRINT:PRINT" 2 - Printer"
5040 PRINT:PRINT" 3 - Opslag"
5050 PRINT:PRINT
5060 PRINT:PRINT" 0 - Hoofdmenu"
5070 MX=3:GOSUB7010:IFCH=0 THEN1110
5080 IFCH=3 THEN GOSUB8010:GOTO1110
5090 PR=0:IFCH=2 THENPR=1
5100 VE=16:HO=0:GOSUB110
5110 PRINT"WIL JE DE BEDRAGEN PER:"
5120 GOSUB3010
5130 GOSUB100
5140 SR$="Budget per "+Q$
5150 PRINTSR$:IFPR=1 THEN GOSUB350:GOSUB360
5160 SR$="INKOMSTEN UITGAVEN"
5170 PRINTSR$:IFPR=1 THEN GOSUB350:GOSUB360
5180 T1=0:T2=0:RE=2:FORI=1 TO100
5190 VE=RE:HO=0:GOSUB110
5200 IFNS(1)<=I THENH1$=" ":GOTO5250
5210 SR=VAL(MID$(SA$(1,I),13,8))
5220 T$=RIGHT$(SA$(1,I),1)
5230 GOSUB6030
5240 T1=T1+SR:H1$=LEFT$(SA$(1,I),10)+SR$
5250 IFNS(2)<=I THENH2$=" ":GOTO5300
5260 SR=VAL(MID$(SA$(2,I),13,8))
5270 T$=RIGHT$(SA$(2,I),1)
5280 GOSUB6030
5290 T2=T2+SR:H2$=LEFT$(SA$(2,I),10)+SR$
5300 SR$=H1$+" "+H2$
5310 PRINTSR$:IFPR=1 THEN GOSUB350:GOSUB360
5320 IF(NS(1)<=I)AND(NS(2)<=I)THENI=100
5330 IFRE=20 THEN GOSUB5510
5340 RE=RE+1:NEXTI:VE=RE
5350 SR$=" +________ +________"
5360 VE=RE:GOSUB110
5370 PRINTSR$:IFPR=1 THEN GOSUB350:GOSUB360
5380 SR=T1:GOSUB310:H1$=SR$
5390 SR=T2:GOSUB310:H2$=SR$
5400 SR$="Totaal "+H1$+" Totaal "+H2$
5410 VE=VE+1:GOSUB110
5420 PRINTSR$:IFPR=1 THEN GOSUB350:GOSUB360
5430 CL=1:GOSUB7510
5440 GOTO1110
5500 REM PAGINA VOL
5510 SR$=" +________ +________"
5520 HO=0
5530 VE=VE+1:GOSUB110:PRINTSR$
5540 SR=T1:GOSUB310:H1$=SR$
5550 SR=T2:GOSUB310:H2$=SR$
5560 SR$="TRANSPORT "+H1$+" TRANSPORT "+H2$
5570 VE=VE+1:GOSUB110:PRINTSR$
5580 CL=0:GOSUB7510
5590 FORVE=2 TO23:GOSUB110
5600 PRINT" ";
5610 NEXTVE:RE=2
5620 VE=2:HO=0:GOSUB110:PRINTSR$
5630 RETURN
6000 REM BEDRAG OMREKENEN
6010 REM T$=INV.GEG.VD TERMIJN
6020 REM DL=UITV.GEG.VH BEDRAG
6030 IFT$="J" THENSR=SR/DL
6040 IFT$="H" THENSR=2*SR/DL
6050 IFT$="K" THENSR=4*SR/DL
6060 IFT$="M" THENSR=12*SR/DL
6070 IFT$="T" THENSR=26*SR/DL
6080 IFT$="W" THENSR=52*SR/DL
6090 CT=8:CN=2:GOSUB310
6100 RETURN
7000 REM KEUZE ROUTINE
7010 VE=23:HO=0:GOSUB110:PRINT"MAAK UW KEUZE...";
7020 GOSUB200:IFIN=0 THEN7020
7030 IF(IN$<"0")OR(IN$>"9")THEN7020
7040 CH=VAL(IN$)
7050 IF(CH<0)OR(CH>MX)THEN7020
7060 GOSUB100
7070 RETURN
7500 REM ENTER ROUTINE
7510 VE=23:HO=0:GOSUB110
7520 PRINT"DRUK OP [ENTER]";
7530 GOSUB200:IF(IN<>13)AND(PR=0)THEN7530
7540 IFCL=1 THEN GOSUB100
7550 RETURN
8000 REM save routine
8010 PRINT"FILENAAM:";:GOSUB120
8020 GOSUB8510
8030 NF=3:GOSUB500
8040 IU=1
8050 FORI=1 TONS(IU)-1
8060 SR$=SA$(IU,I)
8070 GOSUB560
8080 NEXTI
8090 SR$="@"
8100 GOSUB560
8110 IFIU=1 THENIU=2:GOTO8050
8120 GOSUB580
8130 RETURN
8500 REM invoer routine bestandsnaam
8510 GOSUB110:PRINT" BUDG'.. "
8520 PRINT:PRINT"(Geef het jaartal op, bijv. 90)"
8530 V1=VE:H1=HO:HO=HO+7:H1$=""
8540 GOSUB110:PRINTH1$;:GOSUB210
8550 IF(IN$<"0")OR(IN$>"9")THEN8540
8560 H1$=H1$+IN$:IFLEN(H1$)<2 THEN8540
8570 GOSUB110:PRINTH1$:PRINT:GOSUB120
8580 GOSUB110:PRINT"Wil je dit bestand ";
8590 IFC1=1 THENPRINT"laden";
8600 IFC1=3 THENPRINT"bewaren";
8610 PRINT" ? (J of N)"
8620 GOSUB200:IF(IN<>74)AND(IN<>78)THEN8630
8630 GOSUB110
8640 PRINT" ";
8650 VE=V1:HO=H1
8660 IFIN=78 THEN8510
8670 NF$="BUDG'"+H1$
8680 RETURN
9000 REM LOAD ROUTINE
9010 PRINT"LAAD BESTAND";:GOSUB120
9020 GOSUB8510
9030 NF=2:GOSUB500
9040 IU=1:I=1
9050 GOSUB540:IFIN$="@" THENNS(IU)=I:GOTO9070
9060 SA$(IU,I)=IN$:I=I+1:GOTO9050
9070 IFIU=1 THENI=1:IU=2:GOTO9050
9080 GOSUB580
9090 RETURN
30000 REM BUDGET IS EEN PROGRAMMA OM
30010 REM UW INKOMSTEN EN UITGAVEN
30020 REM NU EENS NETJES OP EEN RIJTJE
30030 REM TE ZETTEN.
30040 REM BIJ DE UITVOER WORDEN
30050 REM PRINTER EN DISKGEBRUIK
30060 REM ONDERSTEUND.
30070 REM ============================
30080 REM GEBRUIKTE VARIABELEN
30090 REM HO,VE,IN,CN,CT,SR
30100 REM CH = KEUZENUMMER
30110 REM C1 = HULPVAR. KEUZENR.
30120 REM IU = IN/UITVOERKEUZENR.
30130 REM MX = MAXIMUM INVOERVARIABELE
30140 REM RE = REGELNUMMER
30150 REM I = FOR/NEXT LUSTELLER
30160 REM GD = INVOERCONTROLE
30170 REM NR = INVOERTELLER
30180 REM PR = PRINTERPOINTER
30190 REM T1 = INKOMSTENSALDO
30200 REM T2 = UITGAVENSALDO
30210 REM DL = DELER
30220 REM NF = BESTANDSUITVOER VAR.
30230 REM V1 = HULPVAR. VOOR VE
30240 REM H1 = HULPVAR. VOOR HO
30250 REM NS() = IN/UITGAVENTELLER
30260 REM GEBRUIKTE STRINGS
30270 REM IN$,SR$,NF$
30271 REM Q$ = TERMIJNSTRING
30272 REM H1$,H2$ = HULPSTRINGS
30273 REM T$ = TERMIJNSTRING
30280 REM SA$(x,y) = GEGEVENS STRING
30290 REM IU$() = INKOMSTEN/UITGAVEN TITEL
32000 REM ================================
32010 REM GEMAAKT DOOR:
32020 REM K. v.d. WISSEL
32030 REM NIEUWSTRAAT 306
32040 REM 3201 EG SPIJKENISSE
32050 REM 01880-13398
32060 REM OP EEN LASER XT2 PC
32070 REM NOVEMBER 1989
32080 REM
32090 REM TROS-RADIO dd 900530