www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/19/21:30:50.2

From: richard_fa AT yahoo DOT com
Newsgroups: comp.os.msdos.djgpp
Subject: Re: clear the state of cin
Date: Sat, 20 Mar 1999 01:37:05 GMT
Organization: Deja News - The Leader in Internet Discussion
Lines: 27
Message-ID: <7cuu40$9j9$1@nnrp1.dejanews.com>
References: <7cp369$1ir$1 AT nnrp1 DOT dejanews DOT com> <36f0df92 DOT 54786544 AT news DOT snafu DOT de>
NNTP-Posting-Host: 166.82.121.31
X-Article-Creation-Date: Sat Mar 20 01:37:05 1999 GMT
X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)
X-Http-Proxy: 1.1 x6.dejanews.com:80 (Squid/1.1.22) for client 166.82.121.31
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <36f0df92 DOT 54786544 AT news DOT snafu DOT de>,
  horst DOT kraemer AT snafu DOT de (Horst Kraemer) wrote:
>
> You are relying on unspecified behaviour.
>
> In general when a stream is at end of file, it is at end of file.

thanks, but I differ.  Since I posted my original message I've had a chance to
look at the MS VC++ 6 documentation and it essentially says the same regarding
ios::clear() as does the DJGPP iostream info -- that is, and I quote from the
DJGPP info docs:

- Method: void ios::clear (iostate STATE)
    Set the state indication for this stream to the argument STATE.
    You may call `ios::clear' with no argument, in which case the state
    is set to `good' (no errors pending).

I think this is a bug in the DJGPP compiler.

BTW, MS VC++ works just fine with the sample code in my original message. 
I've also verified that the sample works as I expect under Linux with the
egcs c++ compiler (version egcs-1.0.3).

thanks.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019