-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path04R_Investeringsselectie.bc2
More file actions
437 lines (436 loc) · 12.9 KB
/
04R_Investeringsselectie.bc2
File metadata and controls
437 lines (436 loc) · 12.9 KB
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
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
1000 A=1000:GOTO20:REM INVESTERINGSSELECTIE
1010 UL$="---------------------------------------"
1014 DIMC(50):REM MAXIMAAL 50 PERIODEN
1015 BU=0
1017 REM
1018 REM ** INLEIDING **
1019 REM
1020 GOSUB100:HO=0:VE=0:DD$=".INLEIDING"
1030 GOSUB24600
1040 GOSUB24900
1049 REM
1050 REM ** MENU+KEUZE **
1051 REM
1120 HO=0:VE=0:GOSUB110
1200 PRINT"MENU INVESTERINGSSELECTIE":PRINTUL$
1210 PRINT:PRINT"1. Inleiding"
1220 PRINT"2. Invoer gegevensset"
1230 PRINT"3. Uitvoer berekeningen naar SCHERM"
1235 PRINT"4. Verslag op papier"
1240 PRINT"5. Gegevensset wijzigen"
1250 PRINT"6. Stoppen"
1260 PRINT:PRINT:PRINT"Uw keuze (1-6)...";
1780 GOSUB210
1790 KZ=VAL(IN$):IF(KZ<1) OR(KZ>6) THEN1780
1795 GOSUB250
1800 ONKZ GOTO1020,2000,3000,6000,4000,5000
1999 REM
2000 REM ** INVOEREN GEGEVENSSET **
2001 REM
2010 GOSUB100:PRINT"INVOEREN GEGEVENSSET"
2020 PRINTUL$:PRINT
2030 PRINT"Projectnaam: ";:INPUTPN$
2040 PRINT
2050 PRINT"Aantal perioden: ";:INPUTPP
2055 IF(PP<=50) AND(PP>=1) THEN2070
2060 GOSUB250:GOSUB120:VE=VE-1:GOSUB110
2065 PRINT" ":GOSUB110
2067 GOSUB250:GOTO2050
2070 PRINT"Investeringsbedrag: ";:INPUTC(0):C(0)=-C(0)
2170 PRINT
2180 PRINT"Periode Cashflow"
2190 PRINT"------------------"
2200 FORI=1 TOPP
2210 IFI>5 THEN2220
2215 PRINT" ";I;:GOSUB120:HO=10
2217 GOSUB110:INPUTC(I):GOTO2270
2220 GOSUB120:VE=VE-5
2230 FORJ=4 TO1 STEP-1
2232 HO=0:GOSUB110:PRINT" ";
2234 HO=3:GOSUB110:PRINTI-J;
2240 HO=10:GOSUB110:PRINTC(I-J)
2250 VE=VE+1:NEXTJ
2260 PRINT" ":HO=3:GOSUB110:PRINTI
2262 HO=10:GOSUB110:INPUTC(I)
2270 NEXTI
2280 PRINT
2290 PRINT"Restwaarde: ";:INPUTRW
2300 PRINT"Disconteringsvoet in %: ";:INPUTDV
2310 BU=1
2800 VE=23:HO=0:GOSUB110:PRINT"even geduld a.u.b. ";
2860 GOSUB20000:REM Gemiddelde rentabiliteit MR
2870 GOSUB20200:REM Terugverdienperiode TP
2880 GOSUB20400:REM Interne rentevoet IR
2890 GOSUB20600:REM Netto Contante Waarde NW
2990 GOSUB250:GOSUB24900:GOTO1050
2999 REM
3000 REM ** UITVOER BEREKENINGEN **
3001 REM
3010 GOSUB100:PRINT"UITVOER BEREKENINGEN"
3020 PRINTUL$:PRINT
3030 IFBU=0 THEN3800
3100 PRINT"Projectnaam: ";PN$:PRINT
3110 PRINT"Investeringsbedrag: ";-C(0)
3120 PRINT"Aantal perioden: ";PP:PRINT
3130 PRINT"Disconteringsvoet: ";DV;"%"
3140 PRINT:PRINTUL$:PRINT
3430 PRINT"Gemiddelde rentabiliteit: ";MR$;"%"
3440 PRINT
3450 PRINT"Terugverdiend in ";TP$;" perioden"
3460 PRINT
3470 PRINT"Interne rentevoet: ";IR$;"%"
3480 PRINT
3490 PRINT"Netto Contante Waarde: ";NW$
3495 PRINT:PRINTUL$
3500 HO=0:VE=23:GOSUB110
3510 PRINT" M = Menu O = Overzicht cashflows ";
3520 GOSUB210:GOSUB250
3530 IF(IN$="M") OR(IN$="m") THENGOSUB100:GOTO1050
3540 IF(IN$<>"O") AND(IN$<>"o") THEN3520
3550 CT=8:CN=0:J=1:GOSUB100
3560 PRINT"Periode Cashflow"
3570 PRINT"-------------------"
3580 GOSUB120
3590 FORI=1 TOPP:IFI>9 THENJ=0
3600 HO=3+J:GOSUB110:PRINTI
3605 SR=C(I):GOSUB310
3610 HO=11:GOSUB110:PRINTSR$
3620 IF((VE/21)<>INT(VE/21)) OR(I=PP) THEN3700
3630 GOSUB24900
3640 PRINT"Periode Cashflow"
3650 PRINT"-------------------"
3660 GOSUB120
3690 VE=VE-1
3700 VE=VE+1
3710 NEXTI
3720 GOSUB24900
3730 GOTO3000
3800 DD$=".GEEN UITVOER"
3810 GOSUB120:GOSUB24600
3820 GOSUB24900:GOTO2000
3999 REM
4000 REM ** GEGEVENSSET WIJZIGEN **
4001 REM
4010 GOSUB100:PRINT"GEGEVENSSET WIJZIGEN"
4020 PRINTUL$
4030 IFBU=0 THEN3800
4100 PRINT"1. Projectnaam: ";PN$
4110 PRINT"2. Investeringsbedrag: ";-C(0)
4120 PRINT"3. Aantal perioden: ";PP
4130 PRINT"4. Disconteringsvoet: ";DV;"%"
4140 PRINT"5. Cashflow periode..."
4150 PRINT"6. Restwaarde: ";RW
4155 PRINT"7. Einde wijzigingen"
4160 PRINT:PRINT"Uw keuze (1-7)...";
4170 GOSUB210
4180 KZ=VAL(IN$):IF(KZ<1) OR(KZ>7) THEN4170
4190 GOSUB250
4200 ONKZ GOTO4300,4400,4500,4600,4700,4850,4990
4299 REM ** PROJECTNAAM **
4300 GOSUB120:HO=0:GOSUB110
4310 PRINT"Oude projectnaam: ";PN$
4320 PRINT"Nieuwe projectnaam: ";
4330 INPUTPN$
4390 GOTO4000
4399 REM ** INVESTERINGSBEDRAG **
4400 GOSUB120:HO=0:GOSUB110
4405 PRINT"Oud investeringsbedrag: ";-C(0)
4410 PRINT"Nieuw investeringsbedrag: ";
4420 INPUTC(0):C(0)=-C(0)
4430 GOSUB4900
4440 GOSUB24900:GOTO4000
4499 REM ** AANTAL PERIODEN **
4500 GOSUB120:HO=0:GOSUB110
4505 PRINT"Oude aantal perioden: ";PP
4510 PRINT"Nieuw aantal perioden: ";
4520 INPUTNP:IF(NP>=1) AND(NP<=50) THEN4530
4523 GOSUB250:GOSUB120:VE=VE-1:GOSUB110
4526 PRINT" ":GOSUB110
4528 GOSUB250:GOTO4510
4530 IFNP>PP THENFORI=PP+1 TONP:C(I)=0:NEXTI
4540 PP=NP
4560 GOSUB4900
4570 GOSUB24900:GOTO4000
4599 REM ** DISCONTERINGSVOET **
4600 GOSUB120:HO=0:GOSUB110
4605 PRINT"Oude disconteringsvoet: ";DV;"%"
4610 PRINT"Nieuwe disconteringsvoet in %: ";
4620 INPUTDV
4630 GOSUB4900
4640 GOSUB24900:GOTO4000
4699 REM ** CASHFLOW PERIODE... **
4700 HO=0:VE=10:GOSUB110
4710 PRINT"periode cashflow V=vooruit T=terug"
4720 PRINT"----------------- W=wijzig E=einde"
4730 I=1
4740 HO=3:VE=12:GOSUB110:PRINT" "
4745 GOSUB110:PRINTI:HO=10:GOSUB110:PRINTC(I);
4750 GOSUB210
4755 IF((IN$="V") OR(IN$="v")) AND(I<PP) THENI=I+1
4760 IF((IN$="T") OR(IN$="t")) AND(I>1) THENI=I-1
4765 IF(IN$="W") OR(IN$="w") THEN4800
4770 IF(IN$="E") OR(IN$="e") THEN4835
4790 GOTO4740
4800 HO=18:GOSUB110:PRINT"wordt: ";
4810 GOSUB250:INPUTC(I)
4820 GOSUB110:PRINT" "
4830 GOTO4740
4835 GOSUB250:GOSUB4900
4840 GOSUB24900:GOSUB250:GOTO4000
4849 REM ** RESTWAARDE **
4850 GOSUB120:HO=0:GOSUB110
4852 PRINT"Oude restwaarde: ";RW
4855 PRINT"Nieuwe restwaarde: ";
4860 INPUTRW
4865 GOSUB4900
4870 GOSUB24900:GOTO4000
4899 REM ** HERBEREKENING+OVERZICHT **
4900 HO=0:VE=14:GOSUB110
4905 PRINT" oud nieuw"
4910 PRINT"--------------------------"
4915 PRINT"GR":PRINT"TP":PRINT"IR":PRINT"NW"
4920 VE=16:HO=10:GOSUB110:PRINTMR$
4925 VE=VE+1:GOSUB110:PRINTTP$
4930 VE=VE+1:GOSUB110:PRINTIR$
4935 VE=VE+1:HO=5:GOSUB110:PRINTNW$
4940 IFKZ<>4 THENGOSUB20000
4945 VE=16:HO=21:GOSUB110:PRINTMR$
4950 IF(KZ<>4) AND(KZ<>6) THENGOSUB20200
4955 VE=VE+1:GOSUB110:PRINTTP$
4960 IF(KZ<>4) AND(KZ<>6) THENGOSUB20400
4965 VE=VE+1:GOSUB110:PRINTIR$
4970 IFKZ<>6 THENGOSUB20600
4975 VE=VE+1:HO=16:GOSUB110:PRINTNW$
4980 RETURN
4990 GOSUB100:GOTO1050
4999 REM
5000 REM ** STOPPEN **
5001 REM
5010 HO=0:VE=0:GOSUB100:DD$=".STOP"
5020 GOSUB24600
5030 GOSUB24900
5990 END
5999 REM
6000 REM ** UITVOER NAAR PRINTER **
6001 REM
6060 GOSUB100:PRINT"UITVOER BEREKENINGEN NAAR PRINTER"
6070 IFBU=0 THEN3800
6080 SR$="Projectnaam: "+PN$:GOSUB350:GOSUB360
6090 SR$=UL$:GOSUB350:GOSUB360
6100 GOSUB360
6110 SR=-C(0):GOSUB300:HP$=SR$
6120 SR$="Investeringsbedrag: "+HP$:GOSUB350:GOSUB360
6130 SR=PP:GOSUB300:HP$=SR$
6140 SR$="Aantal perioden: "+HP$:GOSUB350:GOSUB360
6150 SR=DV:GOSUB300:HP$=SR$
6160 SR$="Disconterinsvoet: "+HP$+"%"
6170 GOSUB350:GOSUB360
6180 SR=RW:GOSUB300:HP$=SR$
6190 SR$="Restwaarde: "+HP$
6200 GOSUB350:GOSUB360
6210 GOSUB360
6220 SR$=UL$:GOSUB350:GOSUB360
6230 GOSUB360
6240 SR$="Gemiddelde rentabiliteit: "+MR$+"%"
6250 GOSUB350:GOSUB360
6260 GOSUB360
6270 SR$="Terugverdiend in "+TP$+" perioden"
6280 GOSUB350:GOSUB360
6290 GOSUB360
6300 SR$="Interne rentevoet "+IR$+"%"
6310 GOSUB350:GOSUB360
6320 GOSUB360
6330 SR$="Netto Contante Waarde: "+NW$
6340 GOSUB350:GOSUB360
6350 GOSUB360
6360 SR$=UL$:GOSUB350:GOSUB360
6370 GOSUB360
6380 SR$="Periode Cashflow":GOSUB350:GOSUB360
6390 SR$="-------------------":GOSUB350:GOSUB360
6400 CN=0
6410 FORI=1 TOPP
6420 HP$=" "
6430 CT=2:SR=I:GOSUB310
6440 HP$=HP$+SR$+" "
6450 CT=8:SR=C(I):GOSUB310
6460 HP$=HP$+SR$
6470 SR$=HP$:GOSUB350:GOSUB360
6480 NEXTI
6900 GOSUB100:GOTO1050
19999 REM
20000 REM ** MR **
20001 REM
20010 SZ=0
20020 FORI=0 TOPP
20030 SZ=SZ+C(I)
20040 NEXTI
20050 IFC(0)=0 THENMR=0:GOTO20090
20060 S1=SZ/PP
20070 S2=.5*(-C(0)+RW)
20080 MR=100*(S1/S2)
20090 SR=MR
20100 CT=5:CN=2:GOSUB310
20110 MR$=SR$
20190 RETURN
20199 REM
20200 REM ** TP **
20201 REM
20210 TP=1
20220 VL=C(0)
20230 VL=VL+C(TP)
20240 IFVL>=0 THEN20280
20250 TP=TP+1
20260 IFTP>PP THENTP=0:GOTO20290
20270 GOTO20230
20280 TP=TP-1+(C(TP)-VL)/C(TP)
20290 SR=TP
20300 CT=5:CN=2:GOSUB310:TP$=SR$
20390 RETURN
20399 REM
20400 REM ** IR **
20401 REM
20410 R1=0:R2=1
20430 R=(R1+R2)/2
20440 IFR1>.99 THENR=1:GOTO20520
20450 IFR2<1E-04 THENR=0:GOTO20520
20460 K=R
20470 GOSUB20800
20480 IFABS(NW)<.5 THEN20520
20490 IFNW>0 THEN20510
20500 R2=R:GOTO20430
20510 R1=R:GOTO20430
20520 SR=R*100
20540 CT=5:CN=2:GOSUB310:IR$=SR$
20590 RETURN
20599 REM
20600 REM ** NW HOOFDROUTINE **
20601 REM
20630 K=DV
20640 K=K/100
20650 GOSUB20800
20660 IFABS(NW)<=.1 THENNW=0
20670 SR=NW
20680 CT=10:CN=0:GOSUB310
20690 NW$=SR$
20790 RETURN
20799 REM
20800 REM ** NW SUBSUBROUTINE **
20801 REM
20810 NW=0
20820 FORI=0 TOPP
20830 NW=(C(I)/(1+K)^I)+NW
20840 NEXTI
20890 RETURN
24499 REM
24600 REM ** ZOEK-DATA-EN-ZET-OP-SCHERM **
24601 REM
24610 RESTORE
24620 READSR$:IFSR$="." THEN24660
24630 IFSR$<>DD$ THEN24620
24640 READSR$:IFLEFT$(SR$,1)="." THEN24660
24650 GOSUB24700:GOTO24640
24660 RETURN
24699 REM
24700 REM ** BASICODE-2-TEKST-VORMER **
24701 REM
24720 IFSR$="-" THENSR$=UL$
24740 HO=0:IFLEFT$(SR$,1)<>"#" THEN24780
24750 IFSR$="##" THEN24900
24760 IFSR$="#" THENVE=VE+2:GOSUB110:RETURN
24780 GOSUB110
24840 GOSUB120:IFVE<21 THEN24860
24850 GOSUB24900:GOSUB120
24860 PRINTSR$;:VE=VE+1:GOSUB110
24895 RETURN
24899 REM
24900 REM ** VRAAG-INVOERTOETS **
24901 REM
24910 VE=23:HO=0
24920 GOSUB110
24960 PRINT"druk op een toets...";
24970 GOSUB210
24980 HO=0:VE=0:GOSUB100:RETURN
24999 REM
25000 REM ** DATA **
25001 REM
25300 DATA".GEEN UITVOER"
25310 DATA"Er is geen uitvoer beschikbaar omdat u"
25311 DATA"de benodigde gegevens nog niet heeft"
25312 DATA"ingevoerd."
25320 DATA"#","Voer daarom eerst de gegevens in!"
25400 DATA".STOP"
25410 DATA"Voor meer informatie:"
25420 DATA"#","Prof.Dr. J.L. Bouma,"
25430 DATA"#","Leerboek der bedrijfseconomie deel II"
25440 DATA"De theorie van de financiering van"
25441 DATA"ondernemingen"
26010 DATA".INLEIDING"
26020 DATA"INVESTERINGSSELECTIE","-"
26030 DATA"#","Dit programma is een hulpmiddel bij het"
26031 DATA"beoordelen van investeringsprojecten."
26035 DATA"Berekend worden:"
26040 DATA"#","* Gemiddelde Rentabiliteit (GR):"
26042 DATA" de gemiddelde ontvangsten na aftrek"
26043 DATA" van de gemiddelde afschrijvingen"
26044 DATA" gedeeld door de gemiddelde boekwaarde"
26050 DATA"#","* Terugverdien Periode (TP):"
26052 DATA" dit is de periode die verstrijkt"
26053 DATA" tussen het moment van investeren en"
26054 DATA" het moment waarop de investering"
26055 DATA" geheel terugverkregen is uit de"
26056 DATA" netto-ontvangsten"
26060 DATA"#","* Interne Rentevoet (IR):"
26062 DATA" dit is de rentevoet waarbij de"
26063 DATA" netto contante waarde nul is"
26070 DATA"#","* Netto Contante Waarde (NW):"
26072 DATA" hierbij worden alle netto ontvangsten"
26073 DATA" via discontering toegerekend aan het"
26074 DATA" moment van investeren; van deze"
26075 DATA" bruto contante waarde wordt vervolgens"
26076 DATA" het investeringsbedrag afgetrokken"
26080 DATA"##"
26090 DATA"Benodigde gegevens:"
26100 DATA"#","* Disconteringsvoet:"
26110 DATA" dit is de rente die u bij alternatieve"
26112 DATA" aanwending van het investeringsbedrag"
26114 DATA" zou kunnen verdienen"
26120 DATA"#","* Investeringsuitgave"
26130 DATA"#","* Cashflow per periode:"
26140 DATA" dit zijn de netto ontvangsten van de"
26150 DATA" periode die betrekking hebben op de"
26155 DATA" betreffende investering"
26160 DATA"#","* Restwaarde aan het einde van de"
26165 DATA" levensduur"
26170 DATA"##","Ook kan men de computer de invloed van"
26175 DATA"een verandering in de basisgegevens"
26180 DATA"laten doorrekenen. De resultaten worden"
26185 DATA"in een tabel weergegeven waarbij de"
26190 DATA"volgende afkortingen worden gehanteerd:"
26195 DATA"#"," GR = Gemiddelde Rentabiliteit"
26200 DATA" TP = Terugverdien Periode"
26205 DATA" IR = Interne Rentevoet"
26210 DATA" NW = Netto contante Waarde"
26215 DATA"#","De uitvoer van de berekeningen kan naar"
26220 DATA"de printer worden verzonden."
26225 DATA"#","Februari 1988, J.N.M.Timmers"
26300 DATA"."
30000 REM
30010 REM ****************************
30020 REM * *
30030 REM * INVESTERINGSSELECTIE *
30040 REM * ------------------------ *
30050 REM * *
30060 REM * GEMAAKT OP EEN *
30070 REM * ZX SPECTRUM + *
30080 REM * *
30090 REM * DOOR: *
30100 REM * *
30110 REM * J.N.M. TIMMERS *
30120 REM * HILDEBRANDHOVE 162 *
30130 REM * 2726 BA ZOETERMEER *
30140 REM * *
30150 REM * VERSIE 1.1 FEBRUARI 1988 *
30160 REM * *
30200 REM ****************************
30210 REM
30220 REM COPYRIGHT NOS HILVERSUM