﻿31/32/3300 
  FORTRAN 
  (2.D/MSOS 
  09/12/67 
  

  

  C 
  OTIS 
  HALL 
  PROGRAM— 
  RATE 
  EARNED, 
  LONG 
  TERM 
  INVESTMENT 
  

  

  C 
  HALL 
  — 
  1962, 
  RESEARCH 
  BULLETIN 
  NO. 
  752, 
  PURDUE 
  UNIV. 
  

  

  C 
  HALL" 
  1963* 
  SUPPLEMENT 
  TO 
  APPENDIX, 
  RESEARCH 
  BULLETIN 
  NO. 
  752 
  

  

  C 
  REVISED 
  1967» 
  INT. 
  STA. 
  (WIKSTROM) 
  CDC 
  3100 
  

  

  PROGRAM 
  LTINV1 
  

  

  INTEGER 
  PR 
  

  

  DIMENSION 
  M(150) 
  ,N(150) 
  ,A(150> 
  

   DIMENSION 
  NAME 
  (8) 
  

  

  DIMENSION 
  PR(20) 
  tPRBl 
  (13) 
  »L8L(14) 
  

  

  1 
  READ 
  (60*10) 
  (NAME 
  ( 
  I) 
  » 
  I»l»8' 
  

   10 
  FORMAT 
  (8A4) 
  

  

  WRITE 
  (61*9) 
  (NAME 
  ( 
  I 
  ) 
  ,1=1,8) 
  

   9 
  F0RMAT(19H1NATI0NAL 
  FOREST 
  - 
  ,8A4) 
  

  

  READ 
  (60,10) 
  (NAME 
  ( 
  I 
  ) 
  » 
  I«l 
  ,8) 
  

  

  WRITE 
  (61,8) 
  (NAME(I) 
  ,1 
  = 
  1,8) 
  

   8 
  FORMAT 
  ( 
  8H0UNIT 
  - 
  ,8A4> 
  

  

  READ 
  (60*10) 
  (NAME(I) 
  »I=1»8> 
  

  

  WRITE 
  (61*7) 
  (NAME 
  (I) 
  ,1 
  = 
  1,8) 
  

   7 
  FORMAT 
  (13H0ATTENTI0N 
  - 
  .8A4/1H-) 
  

  

  WRITE 
  (61,20) 
  

  

  20 
  FORMAT 
  (1HC41X34HINVESTMENT 
  ANALYSIS 
  PROGRAM 
  NO. 
  1> 
  

   15 
  READ 
  (60*4) 
  (PR(I) 
  *I»1»20> 
  

  

  GO 
  TO(999»40l)EOFCKF 
  (60) 
  

  

  401 
  I 
  F 
  ( 
  PR 
  ( 
  1 
  ) 
  • 
  EQ 
  . 
  4HNEW 
  ) 
  1.402 
  

  

  4 
  FORMAT 
  (20A4) 
  

  

  402 
  WRITE(61»3) 
  (PR(D 
  ,I=1,20> 
  

  

  3 
  FORMAT 
  (11H0PROBLEM 
  - 
  »20A4> 
  

   READ(60»2> 
  CPRB1 
  ( 
  J) 
  * 
  J«l 
  ♦ 
  13) 
  ♦ 
  I 
  

  

  2 
  FORMAT(i3A4,l3) 
  

   WRITE(61»5) 
  (PRBi 
  (J) 
  , 
  J«i»13) 
  ,1 
  

  

  5 
  FORMAT 
  (iHo»13A4»U//) 
  

   DO 
  21 
  ID=1»I 
  

  

  READ(6o*22>L,LBL,M(ID) 
  ,N(ID) 
  ,A(ID) 
  

  

  22 
  F0RMAT(l3»l4A4,Il,2Xtl3»2X,Fl3.2) 
  

  

  21 
  WRITE 
  (61»23)L,LBL,M(I0) 
  ,N(ID) 
  ,A(ID) 
  

  

  23 
  FORMAT 
  ( 
  \H 
  I3» 
  14A4, 
  1 
  1 
  , 
  2X 
  , 
  13 
  , 
  2X,F 
  13.2) 
  

   120 
  FORMAT 
  ( 
  1H0) 
  

  

  WRITE(61,120> 
  

   J=0 
  

  

  SUM=0.0 
  

  

  P*0.0 
  

   40 
  DO 
  50 
  10=1,1 
  

  

  K=M(ID) 
  

  

  GO 
  T0(46,42)K 
  

   42 
  D=A(ID)/(1.*P)»*N(ID) 
  

  

  GO 
  TO 
  50 
  

  

  46 
  IF(P)49,49,47 
  

  

  47 
  D*A(ID)»((1. 
  ♦ 
  P)»»N(IO) 
  - 
  1. 
  >/<P«Ml. 
  ♦P)**N(ID)) 
  

   GO 
  TO 
  50 
  

  

  49 
  YR= 
  N(ID) 
  

   D= 
  A(ID)»YR 
  

  

  50 
  SUM=SUM 
  ♦ 
  D 
  

  

  IF 
  (SUH)90,62,64 
  

   62 
  PRINT 
  73, 
  P, 
  SUM 
  

  

  73 
  FORMAT 
  (10HINT. 
  RATE 
  F6.4»8X,7H 
  SUM 
  = 
  F20.2) 
  

   GO 
  TO 
  15 
  

  

  64 
  IF( 
  P-0.5)70,70,65 
  

  

  65 
  PRINT 
  66 
  

  

  66 
  FORMAT 
  (39H 
  INTEREST 
  RATE 
  GREATER 
  THAN 
  50 
  PERCENT 
  ) 
  

   GO 
  TO 
  15 
  

  

  70 
  IF(J)80.71,80 
  

  

  71 
  PRINT 
  73,P»SUM 
  

   P=P*.0200 
  

  

  76 
  SUM=0.0 
  

   GO 
  TO 
  40 
  

  

  80 
  IF(J-1)81,82,81 
  

  

  81 
  GO 
  TO 
  62 
  

  

  82 
  PRINT 
  73, 
  P, 
  SUM 
  

   P=P*.0010 
  

  

  85 
  P=P-.000l 
  

   J=2 
  

  

  GO 
  TO 
  76 
  

  

  90 
  IF(J) 
  100,91,100 
  

  

  91 
  IF 
  (P) 
  100*92,100 
  

  

  92 
  PRINT 
  93 
  

  

  93 
  FORMAT 
  ( 
  6H 
  LOSS 
  ) 
  

   GO 
  TO 
  15 
  

  

  100 
  IF(J-2) 
  101,110,101 
  

  

  101 
  J*l 
  

  

  PRINT 
  73, 
  P,SUM 
  

  

  P=P-. 
  0010 
  

  

  GO 
  TO 
  76 
  

   110 
  PRINT 
  73, 
  P, 
  SUM 
  

  

  GO 
  TO 
  85 
  

   999 
  STOP 
  

  

  ENO 
  

  

  3200 
  FORTRAN 
  DIAGNOSTIC 
  RESULTS 
  - 
  FOR 
  LTINV1 
  

  

  NO 
  ERRORS 
  

   LOAD, 
  56 
  

   RUN, 
  15 
  

  

  Figure 
  8. 
  — 
  EDP 
  program 
  for 
  investment 
  analysis, 
  No. 
  1, 
  adapted 
  from 
  Otis 
  Hall 
  program. 
  

  

  30 
  

  

  