Path: utzoo!utgpu!water!watmath!clyde!bellcore!rutgers!gatech!bloom-beacon!mit-eddie!mit-amt!phil From: phil@mit-amt.MEDIA.MIT.EDU (Phil Sohn) Newsgroups: comp.sys.mac.programmer Subject: MPW scanf bug Keywords: scanf("%f") find an I or a N Message-ID: <2878@mit-amt.MEDIA.MIT.EDU> Date: 1 Aug 88 17:10:41 GMT Organization: MIT Media Lab, Cambridge, MA Lines: 13 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