Path: utzoo!attcan!uunet!snorkelwacker!apple!agate!saab.stanford.edu!neon!lucid.com!jwz From: jwz@lucid.com (Jamie Zawinski) Newsgroups: comp.lang.postscript Subject: Re: transfer function (was Re: Help!) Message-ID: Date: 29 Sep 90 03:14:46 GMT References: <20829@well.sf.ca.us> <8301@milton.u.washington.edu> Sender: jwz@lucid.com Organization: Lucid, Inc., Menlo Park, CA Lines: 27 In-reply-to: wiml@milton.u.washington.edu's message of 29 Sep 90 01:02:36 GMT In article <8301@milton.u.washington.edu> wiml@milton.u.washington.edu (William Lewis) writes: > > [ /currenttransfer load /exec cvx 1 /exch cvx /sub cvx fade-factor /mul cvx > 1 /exch cvx /sub cvx ] cvx settransfer ? [ ... ] > { currenttransfer 1 exch sub fade-factor mul 1 exch sub } bind settransfer > > in which the bind does about the same thing as building the proc as an > array did up there, except it binds *all* of it, not just the > /currenttransfer. Hmm... I think both of these are equivalent to my second example, > /saved-transfer currenttransfer def > { { saved-transfer 1 exch sub fade-factor mul 1 exch sub } > settransfer } which now that I think about it some more, I don't think has any problems. To be extra careful, you could do { /--dummy-- 1 exch sub fade-factor mul 1 exch sub } dup 0 currenttransfer put bind settransfer assuming I don't have "put"'s arguments in the wrong order. -- Jamie