🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5731

scanf question

#5731
From: John Salmon
Date: Tue, 21 Feb 1989 19:42
14 lines
832 bytes
I have an old (March 87) draft of the standard which says
in Sec. 4.9.6.2 The fscanf function, paragraph 8:

"...A white-space directive fails if no white-space can be found."

K&R 2nd edition says that "white-space directives are ignored"

Which is correct?  Is count set to 0 or 1 by:
   count = sscanf("10", " %d", &i);

Thanks,
John Salmon
johns@tybalt.caltech.edu
johns@tybalt.caltech.edu.UUCP
Technical Details
Message-ID: <9676@cit-vax.Caltech.Edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!elroy!cit-vax!tybalt.caltech.edu!johns

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!ames!elroy!cit-vax!tybalt.caltech.edu!johns
From: johns@tybalt.caltech.edu (John Salmon)
Newsgroups: comp.std.c
Subject: scanf question
Message-ID: <9676@cit-vax.Caltech.Edu>
Date: 21 Feb 89 19:42:57 GMT
Sender: news@cit-vax.Caltech.Edu
Reply-To: johns@tybalt.caltech.edu.UUCP (John Salmon)
Organization: California Institute of Technology
Lines: 14