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 TAA07687; Tue, 1 Jun 2004 19:43:42 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA07768 for ; Tue, 1 Jun 2004 19:43:41 +0200 (MET DST) Received: from mail.cs.interbusiness.it (relay-6.cs.interbusiness.it [151.99.250.86]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i51HheSH027054 for ; Tue, 1 Jun 2004 19:43:40 +0200 Received: from host37-169.pool8173.interbusiness.it (HELO poincare) (81.73.169.37) by mail.cs.interbusiness.it with ESMTP; 01 Jun 2004 19:47:02 +0200 X-BrightmailFiltered: true X-Ironport-AV: i="3.81R,89,1083535200"; d="scan'208"; a="99695202:sNHT19902530" Received: from poincare ([127.0.0.1] helo=localhost ident=trch) by poincare with esmtp (Exim 3.36 #1 (Debian)) id 1BVDJ3-0000Ku-00; Tue, 01 Jun 2004 19:44:09 +0200 Date: Tue, 01 Jun 2004 19:44:08 +0200 (CEST) Message-Id: <20040601.194408.05425884.debian00@tiscali.be> To: jgoerzen@complete.org Cc: caml-list@inria.fr Subject: Re: [Caml-list] Strange syntax behavior From: Christophe TROESTLER In-Reply-To: <20040601171354.GA16495@excelhustler.com> References: <20040601171354.GA16495@excelhustler.com> Organization: None X-Spook: PGP Exon Shell Crowell COSCO bank Sundevil Noriega credit card Kosovo STARLAN X-Mailer-URL: http://www.mew.org/ X-Operating-System: GNU/Linux (http://www.linux.org/) X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Mailer: Mew version 4.0.61 on Emacs 21.3.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 40BCC04C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 troestler:01 tiscali:99 chris:01 christophe:01 syntax:02 match:02 wrote:03 behavior:03 clause:05 clause:05 latter:06 body:93 despite:07 fun:08 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 1 Jun 2004, John Goerzen wrote: > > In the case of if...then...else, the else clause appears to consume > only the first statement following. With try..with, the with clause > appears to consume everything it possibly can, You can think "with ... -> ..." almost as "fun ... -> ...", so for the latter you certainly expect all that follows to be part of the body of the function. This is also the same for the "match ... with ... -> ..." close. > despite even attempts to stop that with a begin..end clause. Try this: (try p "test" with Not_found -> p "exc"); p "done" or begin try p "test" with Not_found -> p "exc" end; p "done" ChriS ------------------- 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