🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #65

is fflush(stdin) conformant???

#65
From: Michael Keirnan aka Joe Cool
Date: Mon, 02 Nov 1992 21:18
28 lines
1875 bytes
Thanks for the responses regarding the stdarg facility. I have another
question concerning run time facilities. The subject essentially says
it.

I am not actually comtemplating using this construct. A coworker is
enrolled in a course where the instructor has advised flushing stdin
(yes, stdin) in conjunction with using scanf() to "flush the unwanted
newline." This seemed rather odd to me, but hey, what do I know?
So what sayeth the gospel on the subject?

In terms of implemenations, SunOS seems unhappy with this, HP seems to
like it, and rumor has it, Borland on a PC is fine with it. (have not
confirmed this as yet)

The reason I'm interested is that someone teaching a course is
advocating this usage, and IFF they are incorrect I'd like to set the
record straight before legions of C-programmers adopt this method.

Regards,
--
===========================================================================
Michael Keirnan                 | Internet: mgk@sybase.com
Sybase, Inc.                    | #include <legal/disclaimer.h>
---------------------------------------------------------------------------
There are two kinds of people in the world: those who think there are two
kinds of people in the world and those who are smart enough to know better.
                                       - Tom Robbins
===========================================================================
Technical Details
Message-ID: <MGK.92Nov2131855@cedar.sql.sybase.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!rock!concert!uvaarpa!caen!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!ucbvax!mtxinu!sybase!mgk

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!ferkel.ucsb.edu!taco!rock!concert!uvaarpa!caen!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!ucbvax!mtxinu!sybase!mgk
From: mgk@sql.sybase.com (Michael Keirnan aka Joe Cool)
Newsgroups: comp.std.c
Subject: is fflush(stdin) conformant???
Message-ID: <MGK.92Nov2131855@cedar.sql.sybase.com>
Date: 2 Nov 92 21:18:55 GMT
Sender: news@Sybase.COM
Distribution: comp
Organization: Sybase
Lines: 28