🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1503

Re: Explain this sscanf behavior.

#1503
From: Kim Shearer
Date: Fri, 13 Jul 1990 10:01
25 lines
1379 bytes
In <13168@shlump.nac.dec.com> daniels@tle.enet.dec.com (Bradford R. Daniels) writes:

>> compiler A:

>> 	x=1   a=123  b=3
>> 	x=1   a=123  b=3

>This is the correct result.

>> compiler B:
>> 	x=1   a=123  b=3
>> 	x=1   a=123  b=4  <-- yes 4.

>This is clearly wrong, since there aren't even 4 characters in the string...

 Why, the value of b is clearly invalid as only one
 argument was comsumed. Nothing was read into b so
 how can you say it was incorrectly assigned.

+--------------------------------+--------------------------------------------+
Kim Shearer                      |     ARPA: kim%wacsvax.uwa.oz@uunet.uu.net
Dept. of Computer Science        |     UUCP: ..!uunet!munnari!wacsvax!kim
University of Western Australia  |     ACSnet: kim@wacsvax.uwa.oz       
CRAWLEY, Australia 6009          |     PHONE:  +61 9 380 3452 
+--------------------------------+--------------------------------------------+
Technical Details
Message-ID: <kim.647863271@wacsvax.cs.uwa.oz.au>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!uniwa!wacsvax!kim
References: <1990Jul6.181830.2549@tc.fluke.COM> <13168@shlump.nac.dec.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!uniwa!wacsvax!kim
From: kim@wacsvax.cs.uwa.OZ.AU (Kim Shearer)
Newsgroups: comp.std.c
Subject: Re: Explain this sscanf behavior.
Keywords: sscanf ANSI
Message-ID: <kim.647863271@wacsvax.cs.uwa.oz.au>
Date: 13 Jul 90 10:01:11 GMT
References: <1990Jul6.181830.2549@tc.fluke.COM> <13168@shlump.nac.dec.com>
Organization: Computer Science,The University of Western Australia.
Lines: 25