🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5742

Re: a scanf question and a preprocessor question

#5742
From: Henry Spencer
Date: Mon, 27 Feb 1989 17:13
24 lines
1508 bytes
In article <9772@cit-vax.Caltech.Edu> johns@wega.caltech.edu (John Salmon) writes:
>In section 4.9.6.2, the fscanf function:
>I have a very old version of the standard which says the the 
>argument corresponding to a %x directive should be an int, and that
>the conversion is performed according to the rules for strtol.
>If this is true, then there is no way to convert hex constants between
>LONG_MAX and ULONG_MAX...

The wording on this has changed considerably, with problems like that
in mind.

>In section 3.8.1 Conditional Inclusion, paragraph 2: Semantics:
>...During this evaluation, each identifier not currently defined
>as a macro evaluates to 0...
>I am told that this is no longer the case, and that undefined symbols
>in #if pre-processor constant expressions are in error...

You're mistaking people with broken compilers for a change in the standard.
Unknown identifiers still evaluate to 0.  The problem is that K&R1 wasn't
explicit about this and so some compilers object; they will have to be
fixed.
-- 
The Earth is our mother;       |     Henry Spencer at U of Toronto Zoology
our nine months are up.        | uunet!attcan!utzoo!henry henry@zoo.toronto.edu
Technical Details
Message-ID: <1989Feb27.171323.16915@utzoo.uucp>
Path: arc1-ca.pugleaf.net!utzoo!henry
References: <9772@cit-vax.Caltech.Edu>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!utzoo!henry
From: henry@utzoo.uucp (Henry Spencer)
Subject: Re: a scanf question and a preprocessor question
Message-ID: <1989Feb27.171323.16915@utzoo.uucp>
Organization: U of Toronto Zoology
References: <9772@cit-vax.Caltech.Edu>
Date: Mon, 27 Feb 89 17:13:23 GMT