What should [fs]scanf return?
Guy Harris
guy at auspex.UUCP
Sat Jan 21 05:00:44 AEST 1989
>...I think it should be...
You're right. It should be. (And it is, on SunOS 4.0, which means it
probably is on S5R3 as well, since the 4.0 "scanf" code is derived from
the S5R3 "scanf" code....)
I don't know why BSD is confused; perhaps it treats suppressed
assignments as errors, or assumes that just because there were no
succesful assignments (because there were no assignments at all) the
call must have failed. That's wrong. I assume Minix is confused
because it 1) counts even suppressed assignments and 2) counts literal
matches (i.e., the ":" matched the ":"); that's also wrong.
More information about the Comp.lang.c
mailing list