|
|
Thank you. I figured it had to something obvious like that, I only couldn't admit
to it yesterday. Thank you.
I DID take programming courses at one point, granted it was a Modula-2 class, but
it was programming... that's what you forget over the years.
Spider wrote:
> // initalize the array
> #macro InitGrid ()
> #local i = 0;
> #while ( i < 10 )
> #local j = 0;
> //RESET J HERE !!!
> #while ( j < 10 )
> #declare MyGrid[i][j] = 1;
> #local j = j + 1;
> #end
> #local i = i + 1;
> #end
> #end
>
> #macro DrawGrid ()
> #local i = 0;
> #while (i < 10 )
> //RESET J HERE !!!
> #local j = 0;
> #while ( j < 10 )
> sphere { <i*2,2,j*2> MyGrid[i][j]
> pigment { red 1 }
> finish { phong 1 } }
> #local j = j + 1;
> #end
> #local i = i + 1;
> #end
> #end
>
>
> I set the comments. Sorry for screaming :-)
> you only have to reinit J to 0 every outer loop, or it will only happen ince.
> And, use #local inside a macro.
> --
> //Spider
> ( spi### [at] bahnhofse ) [ http://www.bahnhof.se/~spider/ ]
> #declare life = rand(seed(42))*sqrt(-1);
--
Josh English
eng### [at] spiritonecom
www.spiritone.com/~english
Post a reply to this message
|
|