D103 <nomail@nomail> wrote:
> #declare P1 = 1;
> #declare P2 = 1;
> #while(P1<=4&P2<=4)
...
> #declare P1=P1+1;
> #if (P1=4)
> #declare P2=P2+1;
> #declare P1=1;
> #end
> #end
That's a really complicated way of making a nested loop. What's wrong
with the regular way of doing it?
#declare P1 = 0;
#while(P1 < 4)
#declare P2 = 0;
#while(P2 < 4)
...
#declare P2 = P2 + 1;
#end
#declare P1 = P1 + 1;
#end
(Note that array indices start from 0, not from 1.)
--
- Warp
Post a reply to this message
|