[comp.lang.postscript] Correct a "dictfull error"

djd@eos.UUCP (Daniel J. Dasaro) (08/08/90)

I'm getting the same error with a few postscript files (on a Mac):

dict full error, offending command: def

How can I correct this?  I know I somehow have to define dict to be a large
number, I've seen it before but can't find it on my system.
-Danny

alad@adelbert0.stanford.edu (Aladdin Nassar) (08/09/90)

Newsgroups: comp.lang.postscript
Subject: Correct a "dictfull error"
References: <7013@eos.UUCP>
Sender: alad@cive.stanford.edu 
Organization: Stanford University

Please post responses to the Mac's error message : 


"dictfull; OffendingCommand: def"

 
as I face the same problem. Thanks in advance,


Aladdin Nassar
alad@cive.stanford.edu

wiml@milton.u.washington.edu (William Lewis) (08/09/90)

>"dictfull; OffendingCommand: def"

  Well, as two people have posted this, I've seen no answers, and I know
at least this much postscript =8) I'll answer it here:

  The problem (as was guessed) is that the dictionary you are using is
full. The solution is pretty simple:

  <number> dict begin
    ... code
  end

  The "begin" and "end" must match. What this does is create a new 
dictionary (the dict command) with room for <number> definitions
in it, and then make it the current dictionary. When you "end", all
definitions in that dictionary are no longer available (although if
you stored the dictionary in a variable or somewhere before you
began, you could "begin" it again and get them back ... sort of
local variables and local functions...)  Encapsulated files or functions
that don't want to mess with their caller's environment often use this
so they don't overwrite things or pollute the namespace.


-- 
wiml@blake.acs.washington.edu       Seattle, Washington  | No sig under
(William Lewis)  |  47 41' 15" N   122 42' 58" W  |||||||| construction

djd@eos.UUCP (Daniel J. Dasaro) (08/09/90)

wiml@milton.u.washington.edu (William Lewis) writes:

>>"dictfull; OffendingCommand: def"   >full. The solution is pretty simple:
>  <number> dict begin
>  end
>wiml@blake.acs.washington.edu       Seattle, Washington  | No sig under
>(William Lewis)  |  47 41' 15" N   122 42' 58" W  |||||||| construction


Thanks very much, it did the job!  I placed the "<n> dict begin" line right
after the comments and the "end" line right after the showpage and it
worked. 

Thanks again!

-Danny