home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / std / c / 2991 < prev    next >
Encoding:
Text File  |  1992-11-08  |  1.3 KB  |  29 lines

  1. Newsgroups: comp.std.c
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!wupost!darwin.sura.net!haven.umd.edu!decuac!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!e2big.mko.dec.com!jrdzzz.jrd.dec.com!jit345.bad.jit.dec.com!diamond
  3. From: diamond@jit345.bad.jit.dec.com (Norman Diamond)
  4. Subject: Re: is fflush(stdin) conformant???
  5. Message-ID: <Bx7zzF.G8H@jrd.dec.com>
  6. Sender: usenet@jrd.dec.com (USENET News System)
  7. Nntp-Posting-Host: jit345
  8. Reply-To: diamond@jit.dec.com (Norman Diamond)
  9. Organization: Digital Equipment Corporation Japan , Tokyo
  10. References: <MGK.92Nov2131855@cedar.sql.sybase.com>
  11. Date: Thu, 5 Nov 1992 01:54:51 GMT
  12. Lines: 15
  13.  
  14. In article <MGK.92Nov2131855@cedar.sql.sybase.com> mgk@sql.sybase.com (Michael Keirnan aka Joe Cool) writes:
  15. >the instructor has advised flushing stdin in conjunction with using scanf()
  16. >to "flush the unwanted newline."
  17.  
  18. This works on some implementations.  Ask the student if the course is
  19. supposed to teach an implementation-dependent style.  If it's supposed
  20. to teach ANSI C, the student should demand a refund of the tuition.
  21.  
  22. >So what sayeth the gospel on the subject?
  23.  
  24. Undefined.  (But implementations are allowed to define it if they wish.)
  25. --
  26. Norman Diamond       diamond@jit081.enet.dec.com
  27. If this were the company's opinion, I wouldn't be allowed to post it.
  28. "It's been a lovely recession."
  29.