POV-Ray : Newsgroups : povray.general : POV-Ray Includes - Standards : Re: POV-Ray Includes - Standards Server Time
1 Aug 2024 02:13:42 EDT (-0400)
  Re: POV-Ray Includes - Standards  
From: Sabrina Kilian
Date: 3 Dec 2006 20:37:45
Message: <45737be9$1@news.povray.org>
nemesis wrote:
> "Charles C" <nomail@nomail> wrote:
>> My worry would be about files that are expecting to see a global variable by
>> one name and get the prefixed version instead.
> 
> but the alias is given by the user of the include file in his own file.  So,
> the prefix is necessary and he is well aware of it, since it was him who
> named it in the first place.
> 
>> It seems like the scope of
>> #as would have to cover any files that the #included file depends on.
> 
> perhaps an example could illustrate the situation better?
> 
> 
> 

If I understand correctly, the proposed #as would do what, add a prefix
to everything that the include makes available to the outside?

Okay, there would be two ways of handling the following:

#include "nem_bike.inc" #as nem // bike by nemesis

Everything in just bike.inc is prefixed with nem. If bike.inc includes
another file, are those prefixed or not? If not, we run the risk of name
overlap again because those items are probably going to be less likely
to be checked. If they are, how will bike.inc know what variable names
to call?

Will #as tags stack like namespaces, or when a new one is created is the
last one automatically closed?


Post a reply to this message

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