POV-Ray : Newsgroups : povray.general : Scope of identifiers in nested Macros : Re: Scope of identifiers in nested Macros Server Time
2 Nov 2024 17:20:14 EDT (-0400)
  Re: Scope of identifiers in nested Macros  
From: Florian Brucker
Date: 1 Jan 2004 15:57:55
Message: <3ff489d3$1@news.povray.org>
>   I think this should be explained in the documentation if it's not already.
IMHO an implementation like the documentation is described would be 
better that updating the documentation. I think the current behaviour is 
not at all intuitive and can create errors which are very hard to spot. 
Although I have to admit that I have never encountered this error before :)

BTW, any chance the POV-Syntax will be extended with a include-file-wide 
identifier scope? Something like (In an include file):

#public SomeValue = 10; //Global scope, visible to all files & macros

#private AnotherOne = 1; //Include-File scope, only visible to the
			 //Include file and macros within the file

#local LastButNotLeast = 5; //Macro scope, visible only to the macro it
			    //is declared in

This way one would not have to carry along prefixes in include files to 
prevent global scope identifiers from being overwritten.

Florian


Post a reply to this message

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