POV-Ray : Newsgroups : povray.general : Issue with function parameters : Re: Issue with function parameters Server Time
2 Nov 2024 15:26:42 EDT (-0400)
  Re: Issue with function parameters  
From: Florian Brucker
Date: 14 Feb 2004 07:26:27
Message: <402e13f3@news.povray.org>
> Unless I misunderstand the question, he was asking why a named parameter 
> (to a macro or a function) would be masked by a symbol from the global 
> namespace.  It seems that your answer is that *macros* and *functions* 
> should be scoped differently (which makes sense) but doesn't seem to 
> apply to the scoping of the *parameters*.
> 
> Sorry to be dense, but I've re-read this about 5 times and it seems like 
> you either didn't answer the question or I'm missing something.
> 
> So, can you please give an example?  When would it be important that the 
> *named parameter* of a macro be altered by a global #declare?
> 
> Offhand it seems like a flaw in the parser handling of *parameters* of 
> macros, albeit one that could be worked-around by applying a naming 
> convention to the standard include files.
> 
> [BTW, I've written parsers/compilers/interpreters but haven't poked 
> around in POV's source code.]
You're right, this was my actual question. Although I wasn't that 
successful in explaining it like you :)

I just wondered why macro parameters are in the macro's local scope (and 
can therefore have the same name like higher scope identifiers) and why 
function parameters are in global scope.


Thanks for pointing that out
Florian


Post a reply to this message

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