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 NAA26636; Sun, 10 Jun 2001 13:23:22 +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 NAA26766 for ; Sun, 10 Jun 2001 13:23:21 +0200 (MET DST) Received: from mail44.fg.online.no (mail44-s.fg.online.no [148.122.161.44]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f5ABNKj22657 for ; Sun, 10 Jun 2001 13:23:20 +0200 (MET DST) Received: from online.no (ti34a01-0069.dialup.online.no [130.67.68.69]) by mail44.fg.online.no (8.9.3/8.9.3) with ESMTP id NAA02483 for ; Sun, 10 Jun 2001 13:23:11 +0200 (MET DST) Message-ID: <3B235796.73CA31A@online.no> Date: Sun, 10 Jun 2001 13:18:46 +0200 From: Tore Lund X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; U) X-Accept-Language: en,pdf MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] Evaluation Order References: <001501c0f139$9ce86640$210148bf@dylan> <5.1.0.14.0.20010609175833.03bdda20@chasm.org> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Charles Martin wrote: > > The specification that indicates temporal preference is > > let in let in ... Does not a sequence accomplish the same thing? According to the "Développement" (book-ora028.html): La première de des structures typiquement impérative est la séquence. Elle permet l'évaluation ordonnée de gauche à droite d'une suite d'expressions séparées par un point-virgule. and: Une séquence est une expression dont la valeur est celle de sa dernière expression (ici, exprn). Néanmoins toutes les expressions sont évaluées, et en particulier leurs effets de bord sont pris en compte. If I read this right, it says that a sequence is evaluated from left to right and side-effects are taking into account. And it seems to work in this example: # let _ = print_string "before"; print_string "MIDDLE"; print_string "after";; beforeMIDDLEafter- : unit = () but not in this one: # let _ = print_string "before"; Format.print_string "MIDDLE"; print_string "after";; beforeafterMIDDLE- : unit = () What's going on here? All I did was to add "Format". Is not printing an "effet du bord"? -- Tore ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr