From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA17660 for caml-redistribution; Wed, 2 Jul 1997 19:22:42 +0200 (MET DST) 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 KAA24643 for ; Tue, 1 Jul 1997 10:41:01 +0200 (MET DST) Received: from horus.imag.fr (horus.imag.fr [129.88.38.2]) by nez-perce.inria.fr (8.8.5/8.7.3) with ESMTP id KAA20868 for ; Tue, 1 Jul 1997 10:41:01 +0200 (MET DST) Received: from [129.88.38.40] (pythagore.imag.fr [129.88.38.40]) by horus.imag.fr (8.8.1/8.6.9) with SMTP id KAA29319 for ; Tue, 1 Jul 1997 10:40:55 +0200 (MET DST) X-Sender: levy@horus.imag.fr Message-Id: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Tue, 1 Jul 1997 10:43:09 +0100 To: caml-list@inria.fr From: Michel.Levy@imag.fr (Michel Levy) Subject: print and output Sender: weis Bonjour, Quand j'ecris (en Ocaml) le "programme" suivant : print_string ">>"; read_int ();; l'impression a lieu apres la lecture, ce qui me surprend, car il est dit val read_int : unit -> int Flush standart output then ... Quand j'ecris le "programme" suivant : output_string ">>"; read_int ();; l'impression a lieu avant la lecture, ce qui est heureux. Pourquoi cette diffence, car je pensais que : print_string = output_string stdout Hi When I write (in OCAML) the following program : print_string ">>"; read_int ();; the reading takes place before the printing, what surprises me. On the contrary, when I write : output_string ">>"; read_int ();; the printing takes place before the reading, what is better. Why this difference, whereas I thought that : print_string = output_string stdout Michel Levy D106 - Laboratoire LSR B.P.72 - 38402 SAINT MARTIN D'HERES CEDEX - France Tel : 0476827246 e.mail : Michel.Levy@imag.fr