|
|
Hi group
I tried to multiply all elements of an array invoking the prod function,
but it results in an error.
Here is what I tried
#declare Turns = array[3] {1, 10, 20}
#declare Omeg = array[dimension_size(Turns,1)];
#declare c=0;
#declare i=0;
#while(c<dimension_size(Turns,1))
#declare Omeg[c]=360*prod(i,0,c,Turns[i]);
#declare c=c+1;
#end
Great POV-Ray says (shortened):
#declare c=0;
#declare i=0;
#while(c<dimension_size(Turns,1))
#declare Omeg[c]=360*prod( <----ERROR
Parse Error: All #declares of float, vector, and color require
semi-colon ';' at end if the
language version is set to 3.5 or higher.
Either add the semi-colon or set the language version to 3.1 or lower.
What are I'm doing wrong, is prod not a POV-Ray function, it is
mentioned in: 6.1.6.1 Sum and Product functions
Regards,
Sebastian H.
Post a reply to this message
|
|
|
|
In article <40ab3315@news.povray.org> , "Sebastian H." <van### [at] gmxde> wrote:
> I tried to multiply all elements of an array invoking the prod function,
> but it results in an error.
Use POV-Ray 3.6, not 3.5.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
|
|
Thorsten Froehlich wrote:
> In article <40ab3315@news.povray.org> , "Sebastian H." <van### [at] gmxde> wrote:
>
>
>>I tried to multiply all elements of an array invoking the prod function,
>>but it results in an error.
>
>
> Use POV-Ray 3.6, not 3.5.
I would like to :-).
I'll use a loop instead.
Thank you.
Sebastian H.
Post a reply to this message
|
|