POV-Ray : Newsgroups : povray.newusers : Problem with recursion : Re: Problem with recursion Server Time
29 Jul 2024 06:14:22 EDT (-0400)
  Re: Problem with recursion  
From: Alain
Date: 10 Jul 2006 19:32:14
Message: <44b2e37e$1@news.povray.org>
MSAB nous apporta ses lumieres en ce 10/07/2006 15:17:
> Hi,
> I've got a little problem with recursion and include-files.
> 
> I write a macro with recursion which works well. Now I want to write some of
> the object defining (I'm not sure, about that word) in another Include(or
> Pov)-file. In that file are also some if-commands with variables, which I
> defined in the actual file. Than of course the massage came "too many
> nested include files". I think that came because of the recursion, but I'm
> not sure.
> 
> Is there any other possibility, or must I leave the object defining the
> actual file?
> 
> Please help, and sorry for my bad English.
> 
> 
> 
> 
A solution would be to include your file(s) before the recursive part. If the included
file is an 
object deffinition, you can make it a free standing object.
#declare MyObject = object{#include<your include>}

Then, you use MyObject in your recursive macro/function.

-- 
Alain
-------------------------------------------------
'Power corrupts. Absolute power is kind of neat, though.'


Post a reply to this message

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