POV-Ray : Newsgroups : povray.general : Scope of identifiers in nested Macros : Re: Scope of identifiers in nested Macros Server Time
3 Aug 2024 16:20:16 EDT (-0400)
  Re: Scope of identifiers in nested Macros  
From: Florian Brucker
Date: 1 Jan 2004 17:56:12
Message: <3ff4a58c$1@news.povray.org>
>   But the current behaviour can be useful sometimes.
Do you mind to give an example?

> If you make a #local in an include file, its scope will be only inside
> that file.
But you can't use it properly in macros:

<test.inc>
#local ID = 2;

#macro Test()
     #debug str(ID,0,0)
#end
</test.inc>

<main.pov>
#include "test.inc"
Test()
</main.pov>

Render main.pov and see :)

Florian


Post a reply to this message

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