Re: Streams question



On Fri, 28 Oct 2005 23:35:27 -0600, Chris Smith <cdsmith@xxxxxxx>
wrote, quoted or indirectly quoted someone who said :

>Learning by testing is best done when you can write tests that clearly
>select between possible results, and where you can trust the results to
>be reliable.

I was thinking there would be some sort of isOpen method to satisfy
the question simply, but there is not.

To do the test you would have to fool around closing one or other or
both streams and doing i/o on one or other or both streams and seeing
what sorts of failures you got about doing i/o on closed streams.

I don't recall ever reading any documentation on the behaviour. I
figured it out myself a long time ago to my satisfaction by looking at
the source code for various close methods.
..
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
.



Relevant Pages

  • Re: Binary or Ascii Text?
    ... You mean, before Unix developed a uniform notation for text streams, ... misunderstanding Pascal i/o for generations now. ... and structured files -- if not always the same terminators. ...
    (comp.lang.c)
  • Re: [OT] Re: How does C work on non-unix?
    ... So I can't debate that C makes sense on Unix; ... Pascal and Ada do text I/O as character streams broken into ...
    (comp.lang.c)
  • Re: Check if process has a stdin handle
    ... What is a "stdin handle," and what does it mean ... until the program ends, or you close them, or an I/O ... If you close any of these streams ... The closest you can come within Standard C is the feof function. ...
    (comp.lang.c)
  • Re: I/O streaming with custom data transport
    ... Stream-oriented I/O is unformatted per concept of. ... As a block/record/line use String. ... You can find an example of string formatting library here: ... For physical I/O, which is a separate issue, you can still use streams, ...
    (comp.lang.ada)
  • Re: VMS indexed files - how did they work?
    ... TOPS-20 also did ... memory mapped file I/O. ... Tops-20 *supported* byte streams. ... was memory-mapped I/O using the same virtual memory ...
    (comp.os.vms)