|
|
In article <3f5f4f76$1@news.povray.org> , Florian Brucker
<tor### [at] torfboldcom> wrote:
> I understand this from the parser's point of view - normaly, opening
> brackets inside #ifndef() do not make sense, as identifiers aren't
> allowed to contain brackets. In the case of Parse_String(), however,
> it makes sense.
This isn't the parsers problem, it is your scene. You simply do not
generate a valid scene with what you do. This should be clear from the
specification of #ifndef (taking only a single identifier).
However, this isn't all. There is a second misconception. What you expect
is #macros to behave like macros, not functions. However, if you read the
chapter in the documentation which explains the difference between the
POV-Ray #macro and what most people commonly expect from macros (and how
macros return something), you will notice that what you do cannot work as
expected.
Even worse, there is a third roadblock in your code, which is that a #macro
name can also be checked with an #ifndef. And actually this is what the
parser catches first and reports an error for. nevertheless, the first two
problems would persist even if this would be accepted by the parser.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|