POV-Ray : Newsgroups : povray.general : Arrays Server Time
15 Nov 2024 21:17:34 EST (-0500)
  Arrays (Message 1 to 3 of 3)  
From: Felbrigg
Subject: Arrays
Date: 2 Jun 2004 12:37:49
Message: <40be025d$1@news.povray.org>
Dumb question I think but I'm puzzled.  It's my first use of arrays

I'm trying to create an array of variable size but when I try to use any
elements it bombs telling me the array is not initialised.  What am I mising
?


#declare Iterations = 20;
#declare row1 = array[Iterations];
#declare row2 = array[Iterations];

#declare loop = 0;
#while(loop < Iterations)
        row1[loop] = <0,0,0>;    // errors here??????!!!??????
        row2[loop] = <0,0,0>;
        #declare loop = loop + 1;
#end


Post a reply to this message

From: ABX
Subject: Re: Arrays
Date: 2 Jun 2004 12:45:18
Message: <811sb0hoito8o2rioo2tj4i3r0v141hari@4ax.com>
On Wed, 2 Jun 2004 17:38:23 +0100, "Felbrigg" <som### [at] microsoftcom> wrote:

>        row1[loop] = <0,0,0>;    // errors here??????!!!??????
>        row2[loop] = <0,0,0>;

You missed #declare or #local before row1 and row2.

ABX


Post a reply to this message

From: Josh
Subject: Re: Arrays
Date: 3 Jun 2004 11:00:59
Message: <40bf3d2b$1@news.povray.org>
Now I feel stupid
"ABX" <abx### [at] abxartpl> wrote in message
news:811sb0hoito8o2rioo2tj4i3r0v141hari@4ax.com...
> On Wed, 2 Jun 2004 17:38:23 +0100, "Felbrigg" <som### [at] microsoftcom>
wrote:
>
> >        row1[loop] = <0,0,0>;    // errors here??????!!!??????
> >        row2[loop] = <0,0,0>;
>
> You missed #declare or #local before row1 and row2.
>
> ABX


Post a reply to this message

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