POV-Ray : Newsgroups : povray.general : prod function does not work!?? : prod function does not work!?? Server Time
2 Nov 2024 05:20:31 EDT (-0400)
  prod function does not work!??  
From: Sebastian H 
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

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