"jkennedy12" <jke### [at] cornellcollege edu> wrote:
> This is part of the code I'm writing.
>
> #declare RailArray = array[N];
> #declare tmp = 0;
> #while(tmp<=N)
> #declare RailArray[temp] = 0//Spline_1(temp/N);
> #end
>
> It gives me an error when I call the part inside the loop. N is equal to 10.
> Spline_1 is obviously a spline. I can't figure out why it doesn't like this.
Array indexes are 0 based, so an array of dimension N goes from 0 to 1-N.
Try: #while(tmp<N)
-tgq
Post a reply to this message
|