Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #3199

Re: bind’ing loops

Path csiph.com!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From Carlos <carlos@cvkm.cz>
Newsgroups comp.lang.postscript
Subject Re: bind’ing loops
Date Tue, 21 Nov 2017 21:34:55 +0100
Organization A noiseless patient Spider
Lines 29
Message-ID <20171121213455.423a2bee@samara.DOMA> (permalink)
References <0a457d13-e123-42e2-9a2f-f1801af3db2c@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Injection-Info reader02.eternal-september.org; posting-host="5f9a622bb99476dd792e9ccb4050154d"; logging-data="22630"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SF0da7VG8mCzAwtd+eWyboPzwJAXcU8A="
X-Newsreader Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu)
Cancel-Lock sha1:9hIG0fI8oFPii1n/IPP85bf/Wz4=
Xref csiph.com comp.lang.postscript:3199

Show key headers only | View raw


[jdaw1 <jdawiseman@gmail.com>, 2017-11-20 04:26]
> Much PostScript code includes pieces resembling “/… {…} bind def”. Very
> standard.
> 
> Rarely do I use “… {…} bind forall”, and likewise “… {…} bind repeat” and “…
> … … {…} bind for”. Is this just me? Are you folks all enthusiastic bind’ers
> of loops?
> 
> Let’s be specific. Would you bind: 
> 
> true
> [ /showpage /setcolorspace /setcolorspace /setgray /setrgbcolor /sethsbcolor /setcmykcolor /setpattern /setcolor /image /imagemask ]
> {load type /operatortype ne {pop //false exit} if} forall
> 
> ?

If I have a loop at top level, its body is almost never more complicated than
a couple of gsave/grestore, a call to a named proc that does the work, and
maybe a showpage. I don't bind them (but the proc that does the work is usually
bound, and, of course, therefore also the loop bodies in it).
-- 

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

bind’ing loops jdaw1 <jdawiseman@gmail.com> - 2017-11-20 04:26 -0800
  Re: bind’ing loops Carlos <carlos@cvkm.cz> - 2017-11-21 21:34 +0100
    Re: bind’ing loops luser droog <luser.droog@gmail.com> - 2017-11-21 16:39 -0800

csiph-web