POV-Ray : Newsgroups : povray.general : Strange behaviour with looped function calls in POV 3.6 : Strange behaviour with looped function calls in POV 3.6 Server Time
2 Aug 2024 22:12:17 EDT (-0400)
  Strange behaviour with looped function calls in POV 3.6  
From: Florian Brucker
Date: 28 Jun 2004 14:39:49
Message: <40e065f5$1@news.povray.org>
I get strange error messages running the following code in POV-Ray 3.6 
(It works fine in 3.5):

<POV>
#declare MyF = 	function { 1 }

#macro Test(F)
	(1)
#end

#local a = 0;
#while (a<20000)
   		
	#debug "Works\n"
	#local Dummy = Test(MyF);  			
   		
	#local a=a+1;
#end
</POV>



Here's the output:

<output>
...
Works
Works
Works
Works
Works
Works
File: bugsearch.pov  Line: 13
File Context (5 lines):
#while (a<20000)

#debug "Works\n"

#local Dummy = Test(MyF)
Parse Error: Identifier expected, incomplete function call or spline 
call found
  instead.
</output>


As you can see, it outputs "Works" more than 50 times (did not copy all 
of it :) before raising the error. I don't understand this, as each time 
absolutely the same code is executed (content of identifiers are 
unchanged etc.).

If I use

	#local Dummy = Test(function { MyF(x,y,z) });  			

(i.e. wrapping the function in another function block), it works again.

I'm experiencing this on Gentoo 2004.0, with 1 GB Ram and POV 3.6 
official binaries. As I said before, it works without problems under POV 
3.5.

Can anyone confirm this behaviour?

Florian


Post a reply to this message

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