macro runningsum cin cout #finds running cumulative sum of cin and puts result in cout #by PGMathews 1 Oct 2001 v1.0 #Mathews and Malnar, Statistical Trainers and Consultants #217 Third Street, Fairport Harbor, OH 44077 #440-350-0911 pmathews@apk.net #Example call: # mtb > %runningsum c1 c2 mcolumn cin cout mconstant howmany i count cin howmany let cout(1)=cin(1) do i=2:howmany let cout(i)=cout(i-1)+cin(i) enddo endmacro