Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
postscript [2020/02/23 10:20]
christian [Get the code]
postscript [2020/02/23 10:23]
christian [PostScript programming introduction]
Line 81: Line 81:
   * **system dict** "bottom of the stack. Read only with build-in operators"   * **system dict** "bottom of the stack. Read only with build-in operators"
  
-New definitions are put into the topmost dictionary of the stack. This allows programs to override system definitions. The NeWS(([[https://en.wikipedia.org/wiki/NeWS|NeWS]] Wikipedia article)) system from Sun used this to implement an object oriented Display PostScript with the dictionaries as classes. Another view is to see the dictionaries as namespaces.+New definitions are put into the topmost dictionary of the stack. This allows programs to override system definitions. The NeWS system from Sun used this to implement an object oriented Display PostScript with the dictionaries as classes. Another view is to see the dictionaries as namespaces.
  
 The dictionaries can be named with an interesting trick: the dictionary itself is stored under a key which is interpreted as its name. The system dict for example is constructed like: The dictionaries can be named with an interesting trick: the dictionary itself is stored under a key which is interpreted as its name. The system dict for example is constructed like:
  • postscript.txt
  • Last modified: 2020/02/23 15:53
  • by christian