POV-Ray : Newsgroups : povray.general : #ifdef using a string expression? : Re: #ifdef using a string expression? Server Time
19 Apr 2024 23:34:31 EDT (-0400)
  Re: #ifdef using a string expression?  
From: William F Pokorny
Date: 18 Mar 2023 10:19:31
Message: <6415c873$1@news.povray.org>
On 3/18/23 08:59, Kenneth wrote:
> So is a string expression the only kind of 'thing' that #ifdef sees as defined?
> Nope. Even an arbitrary float value behaves the same way:
> 
> #ifdef(7.6)
> ...do this... // success
> #else
> ...do that...
> #end
> 
> To me, this would seem to be an unexpected trap, waiting to be 'exploited' by
> mistake. I'm not sure how such a mistake might be made by a user, but still...
> 
> My two-cents 😉

I agree with three-cents - and now we have five! :-)

I took a quick look just now and v3.7 works as expected in some quick 
testing in that only identifiers are OK - which I do believe is the intent.

So, I'd say this is another v3.8 beta 2 bug.

It's something with the changes in parsing, but it must have happened 
prior to Christoph's back off point for the v3.8 parser too.

Bill P.


Post a reply to this message

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