POV-Ray : Newsgroups : povray.beta-test.binaries : Too many nested variables : Re: Too many nested variables Server Time
16 May 2024 07:36:20 EDT (-0400)
  Re: Too many nested variables  
From: Lutz-Peter Hooge
Date: 17 May 2002 09:17:52
Message: <MPG.174f219615fac04989704@news.povray.org>
In article <3ce4f95f$1@news.povray.org>, "Greg M. Johnson" <gregj:-
)565### [at] aolcom> says...

> The purpose of the code was to make a fractal blob.  I now see how my code
> doesn't do this properly, BUT I'm bothered that I either cannot have nested
> macros or redefine them!

I think the problem is that macros doesn't work the way as you think they 
do. In fact your first declaration of set1() never gets called.

What you assume is: set1() is immediately replaced by the content of the 
last definiton of that macro.
But: In fact this is only done later, when the macro containing the call 
to set1() is called... but at this time you already redefined set1()

This means: your scene is equivalent to

#macro set2()	set1() #end
#macro set1() set2() #end
set1()

-> infinite recursion.

Lutz-Peter


Post a reply to this message

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