Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap1_198111 - decus/20-0020/deprec.tuk
There are 2 other files named deprec.tuk in the archive. Click here to see a list.
1' DESCRIPTION--CALCULATES DEPRECIATION BY ALTERNATIVE METHODS
2' SOURCE--UNKNOWN
3' 
4' THIS PROGRAM WAS WRITTEN FOR STUDENT USE AT AMOS TUCK SCHOOL
5' OF HANOVER, N.H., WHICH DOES NOT ASSUME RESPONSIBILITY FOR
6' ITS ACCURACY.
7'
8' * * * * * * * * * * * * MAIN PROGRAM * * * * * * * * * * * * * *
9'
10 PRINT"THIS PROGRAM COMPUTES AND PRINTS DEPRECIATION BY MONTHS BY"
14 REM SUMMARIES AND COMPUTES AND PRINTS THE PRESENT VALUE OF
20 PRINT"FOUR METHODS: STRAIGHT LINE, DOUBLE DECLINING BALANCE, SUM-OF-"
30 PRINT"THE-YEARS-DIGITS, AND 150 PERCENT DECLINING BALANCE."
40 PRINT
45 PRINT"WHAT IS THE AMOUNT OF THE INVESTMENT";
46 INPUT I1
50 PRINT 
51 PRINT"WHAT IS THE SALVAGE VALUE";
52 INPUT S1
60 PRINT
61 PRINT"WHAT IS THE DEPRECIABLE LIFE (IN YEARS)";
62 INPUTL1
70 PRINT
71 PRINT"WHICH MONTH, IN 1967, IS THE INVESTMENT MADE";
72 INPUT A1
80 PRINT
81 PRINT"WHAT IS THE DISCOUNT RATE (IN DECIMAL NOTATION) FOR COMPUTING"
82 PRINT"THE PRESENT VALUE OF THE ANNUAL DEPRECIATION";
83 INPUT R
90 PRINT
91 PRINT"YOU HAVE OPTIONS ON SWITCHOVER FROM DOUBLE DECLINING BALANCE TO"
92 PRINT"STRAIGHT LINE.  TO PREVENT SWITCHOVER TYPE 0; TO SPECIFY THE"
93 PRINT"YEAR OF SWITCHOVER, TYPE THE YEAR; TO OBTAIN AUTOMATIC SWITCH-"
94 PRINT"OVER WHEN THE ANNUAL STRAIGHT LINE DEPRECIATION BECOMES"
95 PRINT"GREATER THAN DOUBLE DECLINING BALANCE, TYPE 1.  WHICH DO YOU"
96 PRINT"WANT";
97 INPUT Y
98 PRINT
99 PRINT
100 PRINT "DATE","STRLINE","DDB","SYD","150\DB"
110 PRINT
111 LET S2=S1
112 LET S3=S1
113 LET S4=S1
115 LETL2=L1
116 LET L3=L1
117 LETL4 =L1
118 LETA2=A1 
119 LET A3=A1
120 LET A4=A1
121 LETL6=L1
122 LET I2=I1
123 LET I3=I1
124 LET I4=I1
130 LET K= 1967
140 LET D1 = ((I1-S1)/L1)*(1-A1/12)
150 LET Q1 = D1
160 LET F2=0
170 LETD2=(2/L2)*I2*(1-A2/12)
180 LET Q2 = D2
190 LET D3 = ((I3-S3)*(1-A3/12)*(2*L3))/((L3+1)*L3)
200 LET Q3 = D3
210 LET D4 = (1.5/L4)*I4*(1-A4/12)
220 LET Q4 = D4
230 LET V1 = D1/(1+R)
240 LET V2 = D2/(1+R)
250 LET V3 = D3/(1+R)
260 LET V4 = D4/(1+R)
270 FOR M = 1 TO 12
280  IF M<(A1+1) THEN 310
290  LET M1 = D1/(12-A1)
300  GO TO 320
310  LET M1 = 0
320  IF M<(A2+1) THEN 350
330  LET M2 = D2/(12-A2)
340  GO TO 360
350  LET M2=0
360  IF M<(A3+1) THEN 390
370  LET M3 = D3/(12-A3)
380  GO TO 400
390  LET M3=0
400  IF M<(A4+1) THEN 430
410  LET M4 = D4/(12-A4)
420  GO TO 440
430  LET M4 = 0
440  PRINT K""M,M1,M2,M3,M4
450  NEXT M
460 GOSUB 1230
470 LET K = K+1
480 LET D1 = (I1-S1)/L1
490 IF K<(1967+L1) THEN 550
500 LET D1 = I1-S1-Q1
510 IF D1>1 THEN 530
520 LET D1 = 0
530 LET M1 = D1/A1
540 GO TO 560
550 LET M1 = D1/12
560 LET D2 = (2/L2)*(I2-Q2)
570 IF K >= 1967 + L2 THEN 730
580 IF Y < 1 THEN 670
590 IF F2 > 0 THEN 660
600 LET E2 =(I2-S2-Q2)/(1967+L2-K+(A2/12))
610 IF Y = 1 THEN 640
620 IF K<Y THEN 670
630 GO TO 650
640 IF D2>E2 THEN 670
650 LET F2 = E2
660 LET D2 = F2
670 IF D2 <= I2-S2-Q2 THEN 710
680 LET D2 = I2-S2-Q2
690 IF D2>1 THEN 710
700 LET D2 = 0
710 LET M2 = D2/12
720 GO TO 770
730 LET D2 = I2-S2-Q2
740 IF D2>1 THEN 760
750 LET D2 = 0
760 LET M2 = D2/A2
770 LET P3 = (I3-S3-Q3)*2*(1967+L3-K+(A3/12))
780 LET P4 = (1967+L3-K+1)*(1967+L3-K+(A3/6))
790 LET D3 = P3/P4
800 IF K<(1967+L3) THEN 860
810 LET D3 = I3-S3-Q3
820 IF D3>1 THEN 840
830 LET D3 = 0
840 LET M3 = D3/A3
850 GO TO 870
860 LET M3= D3/12
870 LET D4 = (1.5/L4)*(I4-Q4)
880 IF K <1967+L4 THEN 970
890 IF K = 1967 +L4 THEN 920
900 LET D4 = 0
910 GO TO 1010
920 LET D4 = I4-S4-Q4
930 IF D4 >1 THEN 950
940 LET D4 = 0
950 LET M4 = D4/A4
960 GO TO 1020
970 IF D4<= I4-S4-Q4 THEN 990
980 LET D4 = I4-S4-Q4
990 IF D4>1 THEN 1010
1000 LET D4 = 0
1010 LET M4 = D4/12
1020 LET V1 = V1 + D1/((1+R)^(K-1966))
1030 LET V2 = V2 + D2/((1+R)^(K-1966))
1040 LET V3 = V3 + D3/((1+R)^(K-1966))
1050 LET V4 = V4 + D4/((1+R)^(K-1965))
1060 FOR M = 1 TO 12
1070  IF I1-S1-Q1>1 THEN 1090
1080  LET M1=0
1090  LET Q1=Q1+M1
1100  IF I2-S2-Q2 >1 THEN 1120
1110  LET M2 = 0
1120  LET Q2 = Q2+M2
1130  IF I3-S3-Q3 >1 THEN 1150 
1140  LET M3=0
1150  LET Q3 = Q3+M3
1160 IF I4-S4-Q4>1 THEN 1180
1170 LET M4 = 0
1180  LET Q4 = Q4+M4
1190  PRINT K""M,M1,M2,M3,M4
1200  NEXT M
1210 GOSUB 1230
1220 GO TO 1430
1230 PRINT
1240 PRINT "DEP";K,D1,D2,D3,D4
1250 PRINT
1260 PRINT "CUM DEP",Q1,Q2,Q3,Q4
1270 PRINT
1280 LET B1 = I1-S1-Q1
1290 IF B1 > 1 THEN 1310
1300 LET B1 = 0
1310 LET B2 = I2-S2-Q2
1320 IF B2 > 1 THEN 1340
1330 LET B2 = 0
1340 LET B3 = I3-S3-Q3
1350 IF B3 > 1 THEN 1370
1360 LET B3 = 0
1370 LET B4 = I4-S4-Q4
1380 IF B4 > 1 THEN 1400
1390 LET B4 = 0
1400 PRINT "UNDEPR BAL",B1,B2,B3,B4
1410 PRINT
1420 RETURN
1430 IF K>=(1967+L6) THEN 1500
1440 GO TO 470
1450 DATA 10000,0,5,2
1460 DATA 10000,0,5,2
1470 DATA 10000,0,5,2
1480 DATA 10000,0,5,2
1490 DATA 5,.04,1
1500 PRINT
1510 PRINT "PRESENT VALUE"
1520 PRINT "BEGINNING OF"
1530 PRINT "1967,OF DEPRN."
1540 PRINT "AT";R,V1,V2,V3,V4
1620 END