Article View: comp.lang.postscript
Article #8621Re: PostScript question (help needed)
From: Jan Michael Rynning
Date: Thu, 21 Dec 1989 07:42
Date: Thu, 21 Dec 1989 07:42
36 lines
2092 bytes
2092 bytes
In article <342@vidiot.UUCP> brown@vidiot.UUCP (Vidiot) writes:
>I have looked at that read book, but never got the info described from it.
>Adobe also used the word popped when describing taking the currently dictionary
>off the stack. OK, every microcomputer chip that I have programmed loses any
>data that is popped off of a stack, unles you move it somewhere else. I can't
>find in the red book where it says that when the current dictionary is popped
>of the stack it is actually saved somewhere (like VM).
A directory is a composite object, just like a string or an array. The
PostScript interpreter will never push a composite object on any stack,
only a pointer to it. So, when you do
20 dictionary
the interpreter creates a dictionary which can hold up to 20 entries, and
pushes a pointer to that dictionary on the operand stack. Then, when you
do
begin
the interpreter pops that pointer from the operand stack and pushes it on
the dictionary stack. Finally, when you do
end
the interpreter pops the pointer from the dictionary stack and throws it
away. It does not destroy the dictionary that the pointer points to, so
if you have saved away a copy of the pointer in some other place, you can
still access that dictionary.
Jan Michael Rynning, jmr@nada.kth.se
Department of Numerical Analysis If you can't fully handle domains:
and Computing Science, ARPA: jmr%nada.kth.se@uunet.uu.net
Royal Institute of Technology, UUCP: {uunet,mcvax,...}!nada.kth.se!jmr
S-100 44 Stockholm, BITNET: jmr@sekth
Sweden. Phone: +46-8-7906288
Technical Details
Message-ID:
<2600@draken.nada.kth.se>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!draken!jmrReferences:
<314@vidiot.UUCP> <129367@sun.Eng.Sun.COM> <342@vidiot.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!draken!jmr From: jmr@nada.kth.se (Jan Michael Rynning) Newsgroups: comp.lang.postscript Subject: Re: PostScript question (help needed) Message-ID: <2600@draken.nada.kth.se> Date: 21 Dec 89 07:42:17 GMT References: <314@vidiot.UUCP> <129367@sun.Eng.Sun.COM> <342@vidiot.UUCP> Reply-To: jmr@nada.kth.se (Jan Michael Rynning) Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 36