_sys_* etc.
wcs at ho95e.UUCP
wcs at ho95e.UUCP
Mon Jan 19 15:42:40 AEST 1987
In article <5513 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>In article <1258 at ho95e.UUCP> wcs at ho95e.UUCP (Bill Stewart 1-201-949-0705 ihnp4!ho95c!wcs HO 2G202) writes:
>>... why not let
>>_sys_ and _machine_ be preprocessor variables, leading to
>> #define _sys_ SysVR2
>> #define _machine_ u3b2
>>and
>> #if _machine_ = vax
>
>Because the last line has no meaning unless the symbol `vax' is
>also macro defined to something like an integer constant (further, all
>possible system symbols would have to be assigned different constant
>values). (The `=' is not a string compare as in Bourne shell scripts.)
>
>Nice try, though.
Oh, well, it looked good. As you point out (and Larry Rosler did by mail),
= is comparing integers, not strings. Back to suggestions of _mach_vax.
--
# Bill Stewart, AT&T Bell Labs 2G-202, Holmdel NJ 1-201-949-0705 ihnp4!ho95c!wcs
More information about the Comp.lang.c
mailing list