Path: utzoo!utgpu!watmath!att!ucbvax!agate!e260-2d!labc-1aa From: labc-1aa@e260-2d.berkeley.edu Newsgroups: comp.lang.postscript Subject: Re: Building A PostScript Toolset Message-ID: <1989Aug30.184607.21647@agate.uucp> Date: 30 Aug 89 18:46:07 GMT Sender: usenet@agate.uucp (USENET Administrator;;;;ZU44) Reply-To: labc-1aa@web.Berkeley.edu (Bob Heiney) Organization: University of California, Berkeley Lines: 31 A couple of points: In order to minimize potential side effects, when you define names in a ToolSet procedure, you should put them in their own dictionary. Start with a "n dict begin" where "n" is the number of locals you'll use, and finish with an "end". Example: /MyProcedure % arg1 arg2 MyProcedure result { 2 dict begin /arg2 exch def /arg1 exch def ... end } def Also, "%%DEMO" *might* confuse some spooler software since it looks like a document structuring comment (obviously, this is how you're using it, but it isn't part of the standard). How about just "% DEMO"? Finally, my basic rule about using local variables is to make a dictionary entry only if I'm going to use a value more than once. A comment can make up for not having defined a name for an argument. I guess I'd recommend trying to achieve a balance between naming and efficiency. Bob Heiney labc-1aa@web.Berkeley.edu