🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.text
Article #781

Finding available functions (was Re: letter initmatrix, Agfa 3400 PS ...)

#781
From: Perry Hutchison
Date: Tue, 19 Sep 1989 18:49
24 lines
1651 bytes
In article <1408@inria.inria.fr> morain@inria.inria.fr (Francois Morain) writes:

> Each time a new printer comes around, we have problems with tex.ps ...

> Is there any standard postscript command that [lists] the functions ...

Every function which is available to a PostScript program is in one of the
dictionaries.  This will list the names in systemdict:

   systemdict
   { exch ==
     pop
   } forall

The "==" displays the name (on the printer's "standard output", not on the
page), and the "pop" throws away the associated value.  By replacing the
"pop" with additional code, it is possible to walk through the entire
collection of dictionaries reachable from systemdict and thereby obtain a
list of all names which a PostScript program can use, together with their
types and (in some cases) values.

If you decide to try this, remember that systemdict contains an entry which
points to itself.  A program which attempts to dump every dictionary
encountered without checking for such things will loop infinitely.
Technical Details
Message-ID: <637@ccssrv.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!sequent!ccssrv!perry
References: <1408@inria.inria.fr>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!zephyr.ens.tek.com!tektronix!sequent!ccssrv!perry
From: perry@ccssrv.UUCP (Perry Hutchison)
Newsgroups: comp.text,comp.lang.postscript
Subject: Finding available functions (was Re: letter initmatrix, Agfa 3400 PS ...)
Summary: read systemdict
Keywords: postscript
Message-ID: <637@ccssrv.UUCP>
Date: 19 Sep 89 18:49:35 GMT
References: <1408@inria.inria.fr>
Reply-To: perry@ccssrv.UUCP (Perry Hutchison)
Distribution: comp.lang.postscript
Organization: Control-C Software, Inc., Beaverton, OR
Lines: 24