🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #9133

Re: Defining procedures with named parameters

#9133
From: Amanda Walker
Date: Thu, 01 Mar 1990 21:40
25 lines
1603 bytes
In article <14040@cit-vax.Caltech.Edu>, hemphill@cit-vax.Caltech.Edu (Scott
Hemphill) writes:
> The natural thing to do would be to save the old variable contents on the
> stack before assigning the new ones.

I knew I was forgetting some simple approach.  Grin.  I've been using deep
binding in Lisp & PostScript for so long that I forgot about trying shallow
binding...  It still has the potential side effect problem, but at least
it should work and is quite simple.

If you restrict such procedures to returning single objects on the stack
(or, even better yet, leaving the number of returned values on the top of the
stack for the postlog code to look at), you don't even have to mess with
the "counttoprocmark" stuff, which should be a speed win.  Also, this way,
it wouldn't take any more stack space than leaving the parameters on the
stack would.

Off to write some code...

--
Amanda Walker
InterCon Systems Corporation

"Many of the truths we cling to depend greatly upon our own point of view."
	--Obi-Wan Kenobi in "Return of the Jedi"
Technical Details
Message-ID: <1990Mar1.214045.12172@intercon.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!intercon!news
References: <1990Feb28.192129.9580@intercon.com> <14040@cit-vax.Caltech.Edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!intercon!news
From: amanda@mermaid.intercon.com (Amanda Walker)
Newsgroups: comp.lang.postscript
Subject: Re: Defining procedures with named parameters
Message-ID: <1990Mar1.214045.12172@intercon.com>
Date: 1 Mar 90 21:40:45 GMT
References: <1990Feb28.192129.9580@intercon.com> <14040@cit-vax.Caltech.Edu>
Sender: @intercon.com
Reply-To: amanda@mermaid.intercon.com (Amanda Walker)
Organization: InterCon Systems Corporation, Sterling, VA
Lines: 25