Dup Ver Goto 📝

PostscriptLanguage1

PT2/aw/lang/postscript does not exist
To
18 lines, 86 words, 458 chars Page 'PostscriptLanguage1' does not exist.

Postscript is a stack-based language, like Forth. Essentially, you push data onto a stack, and then operate on whatever is on top of the stack. As such, this means you write in postfix notation, so that, for example

% comments begin with %
% add 40 to 2 to get 42
40 2 +
% move to (100,120)
100 120 moveto

Defining

/mymoveto { moveto } def
/mylineto { lineto } def
% and then
100 100 mymoveto
200 200 mylineto