POV-Ray : Newsgroups : povray.general : prod function does not work!?? Server Time
6 Nov 2024 16:33:25 EST (-0500)
  prod function does not work!?? (Message 1 to 4 of 4)  
From: Sebastian H 
Subject: prod function does not work!??
Date: 19 May 2004 06:12:37
Message: <40ab3315@news.povray.org>
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

From: Sebastian H 
Subject: Re: prod function does not work!??
Date: 19 May 2004 06:15:02
Message: <40ab33a6$1@news.povray.org>
Sebastian H. wrote:
> Hi group
> 
> I tried to multiply all elements of an array invoking the prod function, 
> but it results in an error.

Using Povray 3.5 coming with SuSE-Linux 9.0

Sebastian H.


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: prod function does not work!??
Date: 19 May 2004 06:33:21
Message: <40ab37f1$1@news.povray.org>
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

From: Sebastian H 
Subject: Re: prod function does not work!??
Date: 19 May 2004 09:41:52
Message: <40ab6420@news.povray.org>
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

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