delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/09/29/09:04:53

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Fri, 29 Sep 2000 15:03:18 +0200 (MET DST)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: djgpp-workers AT delorie DOT com
Subject: Re: scanf and invalid FP fields
In-Reply-To: <Pine.LNX.4.10.10009291403580.29790-100000@acp3bf>
Message-ID: <Pine.LNX.4.10.10009291454570.29790-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Fri, 29 Sep 2000, Hans-Bernhard Broeker wrote:

[...]
> So it seems like the example is, indeed, in contrast to existing practice
> on Unix libc's. A query in comp.lang.c.std might clarify the status of
> that particular example.

Well, I google'd the strings "100ergs example standard", and found
that this has been filed and handled as a Defect Report to ANSI C89,
back in 1992. See here:

http://wwwold.dkuug.dk/JTC1/SC22/WG14/www/docs/dr_022.html

If I understand that correctly, it says that the example is, indeed, to be
considered correct, by changing a sentence from the paragraph defining
fscanf(), to now read (*emphasis* mine):

+++ quote (7.9.6.2, paragraph [#9], sentence 2, in the C9x draft)
An input item is defined as the longest sequence of input characters which
does not exceed any specified field width and which is,
*or*is*a*prefix*of*, a matching input sequence.
+++ quote ends

This changed version of the sentence is in the C9x standard (draft).

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019