From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA16646; Sat, 16 Oct 2004 17:53:17 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA16515 for ; Sat, 16 Oct 2004 17:53:16 +0200 (MET DST) Received: from smtp.mbg.ocn.ne.jp (mbg.ocn.ne.jp [210.190.142.181]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i9GFrEQd014504 for ; Sat, 16 Oct 2004 17:53:15 +0200 Received: from localhost (p10137-adsau08doujib4-acca.osaka.ocn.ne.jp [221.190.0.137]) by smtp.mbg.ocn.ne.jp (Postfix) with ESMTP id B3D6A430C; Sun, 17 Oct 2004 00:53:13 +0900 (JST) Date: Sun, 17 Oct 2004 00:52:56 +0900 (JST) Message-Id: <20041017.005256.41640390.yoriyuki@mbg.ocn.ne.jp> To: gerd@gerd-stolpmann.de Cc: caml-list@inria.fr Subject: [Caml-list] Flush behavior of baseic I/O class type From: Yamagata Yoriyuki X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 417143EA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; yamagata:01 yoriyuki:01 yoriyuki:01 buffer:01 buffer:01 multibyte:01 yamagata:01 flush:01 flush:01 rec:01 underlying:01 writes:01 underlying:01 exception:02 behavior:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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