by cduan · 15y ago · 0 comments
// In the early 90's I got a job that needed me to create a lot of reports / graphs out of a foxbase database. I had a postscript printer and a copy of Turbo C 2.0 (don't forget to download the floating point patch). Gotta love hand coding Postscript templates. I was loving life when I finally got a openstep box.
3 5 > if ." greater" else ." less" then
PostScript goes with operators like "if" and "ifelse" that consume code literals from the stack (enclosed in curly braces): 3 5 gt { (greater) print } { (less) print } ifelse
It's a little heavier weight, but very flexible and it feels like a natural way to handle postfix conditionals.