POV-Ray : Newsgroups : povray.general : #ifdef using a string expression? : Re: #ifdef using a string expression? Server Time
25 Apr 2024 06:21:56 EDT (-0400)
  Re: #ifdef using a string expression?  
From: Bald Eagle
Date: 19 Mar 2023 10:15:00
Message: <web.641717fa98df09c91f9dae3025979125@news.povray.org>
"Kenneth" <kdw### [at] gmailcom> wrote:

> So with a *properly*-working #ifdef instead of the current flaw in v3.8.0 beta 1
> or 2 'official' versions, I'm still curious about something you mentioned: Is it
> supposed to indeed be a simple boolean comparison? Or is it's operation more
> complex than that?

Wellll.......
I suppose it depends upon what one wants the language to do or thinks it
properly "ought" to do...


One could argue that a keyword is, in some sense, "defined", and as the warning
message states, reserved.

My example (probably me reading the whole post in a haze) of 0 / 1 was really
for _#if_, not #ifdef.

I'm sure that "Real programmers" have a better take on this, and sounder reasons
than I could present.

Aside:
Rather than having to write a whole ifdef/else/end statement for every case I
wanted to test, I had the strong urge to write a macro and maybe use ParseString
to make it work, but we don't have a way to test for data type, isolate
keywords, or any of the tools to write that sort of "meta" code.


Post a reply to this message

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