PostScript TUTORIAL and COOKBOOKの70ページ。70 Chapter 7: LOOPS AND CONDITIONALS に再帰で階乗計算の結果を印刷するサンプルがあります。その階乗計算の部分。 /factorial %stack: n --- n! (after) { dup 1 gt {dup 1 sub factorial mul} if } def print、pstackはスタックに影響を与えませんので、どこに何個入れても問題ありません。 factorialにprint、pstackを入れまくって階乗計算の様子をみてみます。 GS>/factorial {(=factorial\n) print dup 1 gt (==dup 1 gt\n) print pstack {dup 1 sub (==dup 1 sub\n) print pstack f