Article View: comp.lang.postscript
Article #3228Re: transfer function (was Re: Help!)
From: Jamie Zawinski
Date: Sat, 29 Sep 1990 03:14
Date: Sat, 29 Sep 1990 03:14
27 lines
1552 bytes
1552 bytes
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
Technical Details
Message-ID:
<JWZ.90Sep28201446@kolyma.lucid.com>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!apple!agate!saab.stanford.edu!neon!lucid.com!jwzReferences:
<JWZ.90Sep13112918@kolyma.lucid.com> <20829@well.sf.ca.us> <JWZ.90Sep28150050@kolyma.lucid.com> <8301@milton.u.washington.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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: <JWZ.90Sep28201446@kolyma.lucid.com> Date: 29 Sep 90 03:14:46 GMT References: <JWZ.90Sep13112918@kolyma.lucid.com> <20829@well.sf.ca.us> <JWZ.90Sep28150050@kolyma.lucid.com> <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