🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #1674

Re: seeing dictionary names

#1674
From: Scott Hemphill
Date: Mon, 19 Mar 1990 22:15
20 lines
1749 bytes
In article <1085@chinacat.Lonestar.ORG> woody@chinacat.Lonestar.ORG (Woody Baker @ Eagle Signal) writes:
>
>could arrange to embed the name of the dictionary within the dictionary
>by creating a text representation of the name as the 0th element in the
>dictionary, but is there a clean, known way to find it?
>

Yes, there is.  To prepare things, create a dictionary which I will name
"dictdict".  Since PostScript lets you use any object as a key (except -null-)
you can use actual dictionaries as keys, with the name of the dictionary as
the corresponding value.  After you have done this for all dictionaries of
interest, you can "lookup" the name of any of these dictionaries using "get".

If you are really ambitious, you can find all of the accessible named
dictionaries in the system by recursively scanning dictionaries, starting
with "systemdict", making sure that you don't scan a dictionary that you have
already started scanning.  You can also find dictionaries that are embedded
within procedures, and recursively scan those.
-- 
Scott Hemphill	hemphill@csvax.caltech.edu	...!ames!elroy!cit-vax!hemphill
Technical Details
Message-ID: <14346@cit-vax.Caltech.Edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!elroy.jpl.nasa.gov!cit-vax!hemphill
References: <7986@sdcsvax.UCSD.Edu> <3295@hcx1.SSD.CSD.HARRIS.COM> <1085@chinacat.Lonestar.ORG>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!elroy.jpl.nasa.gov!cit-vax!hemphill
From: hemphill@cit-vax.Caltech.Edu (Scott Hemphill)
Newsgroups: comp.lang.postscript
Subject: Re: seeing dictionary names
Message-ID: <14346@cit-vax.Caltech.Edu>
Date: 19 Mar 90 22:15:49 GMT
References: <7986@sdcsvax.UCSD.Edu> <3295@hcx1.SSD.CSD.HARRIS.COM> <1085@chinacat.Lonestar.ORG>
Reply-To: hemphill@cit-vax.UUCP (Scott Hemphill)
Distribution: na
Organization: California Institute of Technology
Lines: 20