POV-Ray : Newsgroups : povray.binaries.scene-files : Recursive Macro Problem : Re: Recursive Macro Problem Server Time
2 Sep 2024 18:20:55 EDT (-0400)
  Re: Recursive Macro Problem  
From: Jerry
Date: 5 Jun 2000 12:04:06
Message: <jerry-56435F.09040505062000@news.povray.org>
In article <3939b7d1@news.povray.org>, "Chris S." 
<chr### [at] bluelectrodecom> wrote:
>#macro Tree_Root(X,Y,Z,R,L,Next)
>
>    #declare counter=0;
>        #declare R=R/1.05;
>        #declare Next=Next-1;
>        #declare counter=counter+1;

Remember that "declare"s are sort of global. You might want "local" for 
those. I don't really understand the macro, but I notice that you are 
both passing "Next" and "R" and "declare"ing them, so possibly those two 
aren't globals. But you are setting "counter" to zero every time you 
call your macro, which might be causing problems if you expect each 
incarnation of the macro to have its own counter.

Jerry


Post a reply to this message

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