| Refresh | Home EGTry.com

use recursive procedure as a way to do repeatitive work


recursive recursive

recursive.ps

%!

%total of a seria of number

/Times-Roman findfont
20 scalefont
setfont



/newline {
	 10 currentpoint 20 sub exch pop     moveto
} def

/printN {
	10 string cvs show
} def


/printNln {
 printN newline 
} def

%recursive procedure
/Inc {
 /N N 1 add store  %increment by 1
 N printNln
 N 10 lt { Inc} if
} def

	

10 700 moveto
/N 0 store
Inc

showpage