POV-Ray : Newsgroups : povray.general : Warn About Naming Conflicts? : Re: Warn About Naming Conflicts? Server Time
31 Jul 2024 22:17:55 EDT (-0400)
  Re: Warn About Naming Conflicts?  
From: Alain
Date: 7 Dec 2006 19:39:38
Message: <4578b44a$1@news.povray.org>
nemesis nous apporta ses lumieres en ce 07/12/2006 07:42:
> Warp <war### [at] tagpovrayorg> wrote:
>>   This is because, if the #macro is indeed in an included file, POV-Ray will
>> open that file, seek to the macro, parse it and close the file, and this each
>> time the macro is called. Thus the overhead is about as bad as an explicit
>> #include call.

> oh, man! This is freakish bad!  It really read the include file each time
> the macro is called?!  Is it an easy way to get local scoping for the macro
> by using the stabilished local file for the include files?... that hurts...

> I'll be downloading the source-code tonight to see things for myself and
> perhaps implement a demo for my #includeas proposal...

What you can do is #declare MyMacro = IncludedMacro
Then, if you need many instances of the macro, you work on the copy, saving you 
from having to open and read the include file each time.

-- 
Alain
-------------------------------------------------
Are you a Klingon, or is that a turtle on your head?


Post a reply to this message

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