POV-Ray : Newsgroups : povray.general : Nested loop problem (or maybe I'm just being stupid) : Re: Nested loop problem (or maybe I'm just being stupid) Server Time
10 Aug 2024 01:27:49 EDT (-0400)
  Re: Nested loop problem (or maybe I'm just being stupid)  
From: Robert Chaffe
Date: 23 Mar 2000 22:27:00
Message: <38dae084$1@news.povray.org>
Oh, and another thing, did you mean to use "#local" instead of
"#declare" within the loops?  Someone else might shed some
light on whether that mix is expected to work here.

rc

"Robert Chaffe" <a0003738@airmail.net> wrote in message
news:38dadf04@news.povray.org...
> Note moved declaration of b below.  Is that what you need?
> rc
>
> "Richard Speir" <dai### [at] mindspringcom> wrote in message
> news:38DADE7C.CFB725A1@mindspring.com...
> > Bah!!  Cursed Netscape mail program!  Here's the code; hope it's clearer
> > now:
> >
> > #declare a = 0;
>
> /*  #declare b = 0;     <== removed this and moved down ...   */
>
> > #declare layers = 3;
> > #declare sections = 12;
> >
> > #while (a<layers+1)
>
>       #declare b = 0;    /* ... to here.  */
>
> >     #while (b<sections+1)
> >         <insert macro here>
> >         #local b = b + 1;
> >     #end
> > #local a = a + 1;
> > #end


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.