Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* [Caml-list] Flush behavior of baseic I/O class type
@ 2004-10-16 15:52 Yamagata Yoriyuki
  2004-10-16 16:26 ` David MENTRE
  2004-10-16 22:30 ` skaller
  0 siblings, 2 replies; 6+ messages in thread
From: Yamagata Yoriyuki @ 2004-10-16 15:52 UTC (permalink / raw)
  To: gerd; +Cc: caml-list

Hi,

In http://www.ocaml-programming.de/rec/IO-Classes.html, flush method
is defined as "The implementation may choose that put does not write
directly to the underlying resource, but into a buffer. In this case,
the call of flush writes the contents of the buffer to the
resource. When there is no such buffer, the call does nothing."

However if flush cannot output the whole buffer, what should it do?
The underlying output channel could be blocked, or the channel is code
converter and flush is called in the middle of the multibyte
character.

I think three possibility.
  1) Output as far as possible, and leave the rest.
  2) raise an exception
  3) undefined.

What is your opinion?

--
Yamagata Yoriyuki


-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-10-16 22:30 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-16 15:52 [Caml-list] Flush behavior of baseic I/O class type Yamagata Yoriyuki
2004-10-16 16:26 ` David MENTRE
2004-10-16 17:51   ` Yamagata Yoriyuki
2004-10-16 19:40     ` Gerd Stolpmann
2004-10-16 20:16     ` John Prevost
2004-10-16 22:30 ` skaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox