On Mon, 5 Apr 2021 10:23:58 -0700, Charles Mills wrote:
>
>#ifdef WIN32
>static const bool IsZOS = false;
>#else
>static const bool IsZOS = true;
>#endif
>
Hmmm ... Anything that isn't WIN32 is z/OS.
∴ Linux == z/OS;

(Granted, I'm unfamiliar with your environment.)

But I once on a FOSS project made a similar mistake; something like:

#define EBCDIC ( '0' == 240 )

... only to be scolded by a programmer on an EBCDIC system on which
'0'  != 240; Siemens BS2000.

My Pascal training dies hard; I still prefer "enum" to "static const".
And only "#define" is available for preprocessor tests.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to