[comp.sys.mac.programmer] MPW scanf bug

phil@mit-amt.MEDIA.MIT.EDU (Phil Sohn) (08/02/88)

	If you are looking for a float in MPW C 2.0.2 and the
next character in the stream is either an 'i' or a 'n' scanf will
fail, but not put the 'i' or 'n' back on the stream.  I assume
this is because scanf("%f") counts "inf" as infinity and "NaN" as
Not a Number.  However, when it fails, it should still put the
character back into the stream.

	Does Apple have some sort of fix for this?  I guess I have
to write me own scanf.


				phil@ems.media.mit.edu