Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!lll-winken!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.lang.c Subject: Re: learning c Keywords: getchar() Message-ID: <1383@auspex.auspex.com> Date: 4 Apr 89 09:20:23 GMT References: <1091@bnlux0.bnl.gov> <584@greens.UUCP> <6487@bsu-cs.UUCP> Reply-To: guy@auspex.auspex.com (Guy Harris) Distribution: usa Organization: Auspex Systems, Santa Clara Lines: 13 >I don't know what the ANSI standard says, but for now it probably >doesn't matter. It says that the behavior is undefined if you do an "fflush" on an read-only stream or a read/write stream in which the most recent operation was not an input operation. Translation: "fflush" doesn't flush input, so the ANSI standard says nothing new - it says "it flushes output, we make no claims about input", which reflects current practice (S5R3's "fflush" appears to flush input, although it's not documented - which is kind of obnoxious; either it's a useful feature, in which case it should be documented and supported, or it's a useless one, in which case it shouldn't have been put in; 4.3-tahoe's doesn't; Turbo C's is documented as doing so and presumably does; etc..)