POV-Ray : Newsgroups : povray.general : Warn About Naming Conflicts? : Re: Warn About Naming Conflicts? Server Time
31 Jul 2024 16:27:28 EDT (-0400)
  Re: Warn About Naming Conflicts?  
From: Ben Chambers
Date: 6 Dec 2006 13:31:07
Message: <45770c6b$1@news.povray.org>
Florian Brucker wrote:
> This is not always possible: Imagine calling a include file inside a
> loop, where the include file uses a global variable that has to be
> changed for every run:
> 
> #local index = 0;
> #while (index<10000)
> 	#declare This_Is_Used_By_The_Include = Some_Function(index);
> 	#include "someinclude.inc"
> 	#local index = index + 1;
> #end
> 
> You'll always have to rely to some extent on the 3rd-party programmer,
> even if you use real OOP-languages like C++ or Java.
> 
> 
> Regards,
> Florian

This is certainly possible now, however it goes back to the old practice 
of using an include file as a macro, rather than including a file once, 
and calling a macro inside of it.  IMNSHO, this practice should be 
discourage anyway, so I would consider it a bonus ;)

...Chambers


Post a reply to this message

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