POV-Ray : Newsgroups : povray.general : #ifdef using a string expression? : #ifdef using a string expression? Server Time
23 Mar 2023 22:57:11 EDT (-0400)
  #ifdef using a string expression?  
From: Kenneth
Date: 14 Mar 2023 08:45:00
Message: <web.64106b86bf01f0119b4924336e066e29@news.povray.org>
(v3.8.0 beta 1 in Windows 10)

I was playing around with #ifdef recently; just experimenting.

I put a nonsense string expression into it-- not actually defined anywhere-- to
see what would happen:

....do this...
....do that...

Instead of issuing an error message or even a fatal error as I half-way
expected, it actually fell through to the *first* clause successfully. Without
the double quotes, it works as expected and falls through to the #else.

Should #ifdef behave this way? Is the first double-quote causing some kind of
unforeseen problem for the parser?

Post a reply to this message

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