|
 |
"Kenneth" <kdw### [at] gmail com> wrote:
> Yep, I get that-- if the #ifdef is seeing it as boolean, that is. But here's a
> weird thing (well, weird to me at this point of my fuzzy understanding):
> #ifdef(true)
> is apparently seen as NOT defined, and falls through to the #else. Of course,
> I'm not even sure if that construct makes any sense code-wise or syntax-wise.
And you get that to work without a warning?
My few test cases resulted in:
#ifdef ("String") returns true.
#ifdef (1) returns true.
#ifdef (0) returns true.
"C:\Users\Mini\Documents\POV-Ray\v3.8-beta\scenes\DefinedValues.pov" line 13:
Parse Warning: Tried to test whether a reserved keyword is defined. Test result
may not be what you expect, and may fundamentally differ in future
versions.
#ifdef (true) returns false.
#ifdef (tau) returns false.
#ifdef (pi) returns false.
#ifdef (pigment) returns false.
#ifdef (if) returns false.
"C:\Users\Mini\Documents\POV-Ray\v3.8-beta\scenes\DefinedValues.pov" line 15:
Parse Warning: Tried to test whether a reserved keyword is defined. Test result
may not be what you expect, and may fundamentally differ in future
versions.
"C:\Users\Mini\Documents\POV-Ray\v3.8-beta\scenes\DefinedValues.pov" line 17:
Parse Warning: Tried to test whether a reserved keyword is defined. Test result
may not be what you expect, and may fundamentally differ in future
versions.
"C:\Users\Mini\Documents\POV-Ray\v3.8-beta\scenes\DefinedValues.pov" line 19:
Parse Warning: Tried to test whether a reserved keyword is defined. Test result
may not be what you expect, and may fundamentally differ in future
versions.
"C:\Users\Mini\Documents\POV-Ray\v3.8-beta\scenes\DefinedValues.pov" line 21:
Parse Warning: Tried to test whether a reserved keyword is defined. Test result
may not be what you expect, and may fundamentally differ in future
versions.
-
"C:\Users\Mini\Documents\POV-Ray\v3.8-beta\scenes\DefinedValues.pov" line 32:
Note that, "Test result may not be what you expect...." because it's a keyword,
not a proper variable.
I also tried:
#ifdef (0a) #debug concat ("#ifdef (", "0a", ") returns true. \n") #else #debug
concat ("#ifdef (", "0a", ") returns false. \n") #end
and get "No matching ), undeclared identifier found instead."
Post a reply to this message
|
 |