"Warp" <war### [at] tagpovrayorg> wrote in message
news:3ceff8e4@news.povray.org...
> Jonathan Wooldridge <jwo### [at] attbicom> wrote:
> > #local C=C-1;
> > // Do stuff with C
>
> > #local C=C-1;
> > // Do stuff with C
>
> If you can get rid of those #locals and do only one #local C=C-10 at the
> end of the loop, better.
>
No sooner said than done!
// Script without so many locals ("Spam, spam, spam and eggs spam hasn't got
too much spam in it"...)
#local C=1000000;
#while(C)
do_stuff( C );
do_stuff( C - 1 );
do_stuff( C - 2 );
...
do_stuff( C - 8 );
do_stuff( C - 9 );
do_stuff( C - 10 );
#local C = C - 10;
#end
Post a reply to this message
|