Path: utzoo!attcan!uunet!cs.utexas.edu!sun-barr!newstop!sun!amdcad!light!bvs From: bvs@light.uucp (Bakul Shah) Newsgroups: comp.lang.postscript Subject: A question about //add Message-ID: <1990Nov12.195235.13908@light.uucp> Date: 12 Nov 90 19:52:34 GMT Reply-To: bvs@BitBlocks.COM (Bakul Shah) Organization: Bit Blocks, Inc. Lines: 41 All versions of the (Adobe) PostScript interpreter since version 25.0 provide an immediately evaluated name facility: When the scanner encounters a `//name' token, it immediately looks up the name in the current dictionary stack and substitutes the name's value for the name[%]. The effect is as if the `load' operator had been applied to the name (except that this happens in the scanner). Now the Question. If at the top level (i.e. not nested within any braces) the input is 1 2 //add should the operand stack contain 1 2 --add-- or 3 ? You can test this by feeding 1 2 //add pstack clear to your PostScript interprter. My QMS PS 410 printer (running Adobe PostScript version 52.4) says the stack has 1 2 --add--. Initially I thought that was the correct behavior but L. Peter Deutsch , the author of Ghostscript, argues the stack should contain 3 and I agree with him now. Is the bug in the interpreter, the Supplement document (:-) or did we miss something? Can we get an *official* clarification? Our reason for thinking the stack should contain 3 is this: Since the scanner hands an *operator* to the interpreter, the interpreter must execute the -add-- operator, following the rules on page 42 of the Red Book (see the para. starting with `An executable operator object...'). Yours in nitpicking Bakul Shah or ..!{ames,att,decwrl,pyramid,sun,uunet}!amdcad!light!bvs [%] See the Supplement document, available through Adobe's File Server, for details as this feature is not described in the Red Book.