POV-Ray : Newsgroups : povray.advanced-users : Macros in Macros? : Re: Macros in Macros? Server Time
29 Jul 2024 06:28:07 EDT (-0400)
  Re: Macros in Macros?  
From: Rune
Date: 19 Oct 2002 10:57:47
Message: <3db172eb$1@news.povray.org>
Tim Nikias wrote:
> Now this:
> I always thought that parameters and variables
> etc are just temporarily stored while in the
> macro, and that they are destroyed and the memory
> is set free after the macro "destructs".

While this is the case when you use #local, it is not the case when you
use #declare (except under special conditions). So it's not a general
rule. Since #macros neither use the #declare, nor the #local keyword
when they are defined, there's no reason to assume that they have the
same scope as either #declared variables or #local'ed variables. #macros
always have global scope, though I'm not sure if it's mentioned in the
documentation.

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated Sep 8)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

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