🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3664

Re: A question about //add

#3664
From: Peter Korp
Date: Tue, 13 Nov 1990 22:05
53 lines
2348 bytes
In article <321@heaven.woodside.ca.us> glenn@heaven.woodside.ca.us (Glenn Reid) writes:
>In article <1990Nov12.195235.13908@light.uucp> bvs@BitBlocks.COM (Bakul Shah) writes:
>>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 <ghost@aladdin.com>, the
>>author of Ghostscript, argues the stack should contain 3 and I
>>agree with him now.
>
>Just as a data point, I tried your program on my (Adobe) Display
>PostScript interpreter and got "3" on the stack:
>
>	heaven> /usr/lib/NextStep/WindowServer -e start
>	PostScript(r) Version 1006.24
>	PS>1 2 //add pstack     
>	3 
>	PS>quit
>
[talk of what should be left on stack deleted]

As another point of reference, I trie it in OpenWindows and got:

	tripoli-> psh
	executive
	Welcome to X11/NeWS Version 2
	1 2 //add
	stack
	3 
	quit
	psh: NeWS server disconnected


It is nice to see the PS interpreters agree about what to do! :-)

Peter
Technical Details
Message-ID: <1990Nov13.220516.14826@mcs.anl.gov>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!milo.mcs.anl.gov!atlantis.ees.anl.gov!korp
References: <1990Nov12.195235.13908@light.uucp> <321@heaven.woodside.ca.us>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!julius.cs.uiuc.edu!ux1.cso.uiuc.edu!milo.mcs.anl.gov!atlantis.ees.anl.gov!korp
From: korp@atlantis.ees.anl.gov (Peter Korp)
Newsgroups: comp.lang.postscript
Subject: Re: A question about //add
Message-ID: <1990Nov13.220516.14826@mcs.anl.gov>
Date: 13 Nov 90 22:05:16 GMT
References: <1990Nov12.195235.13908@light.uucp> <321@heaven.woodside.ca.us>
Sender: news@mcs.anl.gov
Organization: Advanced Computer Application Center, Argonne National Laboratory
Lines: 53
Nntp-Posting-Host: atlantis.ees.anl.gov