Stacks and RPN are still the best thing ever*:
%!
% monkeys.ps
% best run with
% gs -q -dNODISPLAY monkeys.ps
% if at all ...
/verse {
dup print
( little monkey) print
dup (One) ne {
(s) print
} if
( jumping on the bed\n) print
dup (One) ne {
(One fell off and bumped his head\n)
} {
(They fell off and bumped their head\n)
} ifelse print
(Mama called the doctor,\nAnd the doctor said\n) print
(One) ne {
(No more monkeys jumping on the bed\n)
} {
(Put those monkeys right to bed\n)
} ifelse print
(\n) print
} def
[ (Five) (Four) (Three) (Two) (One) ] { verse } forall
quit
cheers,
Stewart
*: for job security, that is.
---
Talk Mailing List
[email protected]
http://gtalug.org/mailman/listinfo/talk