rem *______________ Section 5.5 ___________________*
rem *						   *
rem *         PRINT STOCK STATISTICS PROGRAM 	   *
rem *	      ------------------------------	   *
rem *	UPDATED: January 10, 1983		   *
rem *	COPYRIGHT: E. A. Valenzuela		   *
rem *	VERSION: 1.30				   *
rem *----------------------------------------------*

rem *--- requires subroutines ---
rem         scrnin.bas ... for function

6600 REM
6610 rem set up printer for small print 132 characters per line 

lprinter width 132
print small.print$
print newpage$

print
print tab(6);title$
PRINT TAB(8);TITLE2$
print
print tab(6); "DATE: "; newdate$
print

 RETURN

6620 rem ...performance vs. original purchase ...

print "                                                                       total                                      total"    
print tab(6);"stk   date     no.          company      stock   purch  current  purchase" \
      ;"  current    $         %  dividend  annual   % of"
print tab(6);"no.  purchd   shrs symbol                xchng   equiv   price    cost   " \
      +"  value   increase    inc   yield   return  assets"
print
for6$="     TOTALS :                                                        #####.##" \
      +" #####.##  ######.##  ###.#"

for5$="     ##  /....../  ### /..../  /............/  /../  ##.###   ##.###  ####.##" \
      +"  ####.##   #####.##  ###.#  ##.#   ###.#   ##.#"

sum1=0
sum2=0
sum3=0
for i% = 1 to nstk%
 sum2=sum2 + NEWvalue(i%)
next i%

for i% = 1 to nstk% 
  j% = i%
  if sortcheck$="yes" then j% = kode%(i%)
  pcntport = newvalue(j%)/sum2 * 100
print using for5$;i%,purdate$(j%),nshrs%(j%),symbol$(j%),namstk$(j%), \
           xchng$(j%),equiv(j%),NEWprice(j%),totpurprice(j%),NEWvalue(j%), \
           INCVALUE(j%),pcntinc(j%),yield(j%),ANYIELD(J%),pcntport
if fn.mod%(i%,5) eq 5 then print
sum1=sum1+totpurprice(i%)
sum3=sum3+INCVALUE(i%)
next i%

sum4=sum3/sum1*100.
print
print using for6$; sum1,sum2,sum3,sum4

CONSOLE
 RETURN

rem *---------- end of sub stock file print -------*

