Explain this sscanf behavior.

Karl Heuer karl at haddock.ima.isc.com
Thu Jul 12 07:45:24 AEST 1990


In article <1666 at tuvie> inst182 at tuvie.UUCP (Inst.f.Techn.Informatik) writes:
>To add a new variant, on a DECstation 3100 (Ultrix 2.1) both cc (1.31) and
>gcc (1.37) give the following results:
>	x=2, a=123, b=3
>	x=1, a=123, b=3

That first one has to be wrong; you can't get a return value of 2 when you
only have one input format specifier (%n doesn't count).

Karl W. Z. Heuer (karl at kelp.ima.isc.com or ima!kelp!karl), The Walking Lint



More information about the Comp.std.c mailing list