|
|
Maybe something like a _chain_ of recursive macros?
Pardon my crap code - just illustrating the idea.
I'm sure there needs to be something to make sure the scope is right for the
counter, etc.
> #macro VeryRecursive(A_var)
> #local Something = 1;
> Some interesting actions and calculations involving A_var
> #local AnotherVar = A calculus result
#declare counter = counter +1
#if (AnotherVar < SomeLimit & counter >= 32)
#VeryRecursiveClone(AnotherVar)
#else
#if (AnotherVar < SomeLimit)
> VeryRecursive(AnotherVar)
> #end
> #end
Either that, or store your values on a global scope level, "pop out" of the
recursion, check in and outer SDL macro if you need to call VeryRecursive again,
and just keep cycling _that_ way.
Or just _simply_ have all of the #if testing be done after the calculation macro
is run, and the rerun it, over and over and over again with a while loop.
Post a reply to this message
|
|