|
|
I've just spend a few days trying to find a bug in my Povray code. Now I
believe something's wrong with the Povray engine (version
3.6.1b.icl8.win32).
Please take a look at the sample code below to see if I made a mistake. If
you can't find any, please try it on your own system and let me know what
results you found.
Kind regards,
Wil Koenen
/*--------------------------------------------------------------------------
--
Author : Wil Koenen
Date : 12 mar 2006
Description: Sample POVRAY code demonstrating an apparent bug.
The code was derived from a much, much larger program, by stripping it down
to the essentials. The problem is that a simple macro does not always change
its output parameter.
The error is deterministic, i.e. the same code produces the same error when
run many times. However, adding #debug directives, or other directives that
should not change the behaviour (e.g. #local dummy=0; ) may change the
behaviour (the iteration number at which the error occurs).
----------------------------------------------------------------------------
*/
#macro f(xx)
#declare xx=+1; // just a non-zero value
#end
//--------------------------------------------------------------------------
--
#declare i = 0;
#while (i< 10000)
#declare a=-1;
f(a)
#local s=concat(
"i = ", str(i,0,0),
", a=", str(a,0,0),
"\n")
#if (a>0)
#debug s
#else
#error s
#end
#declare i=i+1;
#end
Post a reply to this message
|
|
|
|
> It is a known bug and, AFAIK, should be adressed in the next update.
FYI, the workaround is to not pass variables by reference. If you need a
macro to return more than one value, have it return its results through
global variables; call the macro and read the variables it sets.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
|
|
"Tim Nikias" <JUSTTHELOWERCASE:timISNOTnikias(at)gmx.netWARE> wrote in
message news:4414b9cb@news.povray.org...
> It is a known bug and, AFAIK, should be adressed in the next update.
Indeed, I tested on 3.7.0.beta.11c.icl8-sse2.win32 and the problem was gone.
Thanks for your help.
Wil Koenen
Post a reply to this message
|
|