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 RAA28293; Tue, 4 May 2004 17:02:43 +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 RAA28131 for ; Tue, 4 May 2004 17:02:41 +0200 (MET DST) Received: from mailf1.uni-siegen.de (mailf1.uni-siegen.de [141.99.11.41]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i44F0fSH006016 for ; Tue, 4 May 2004 17:02:41 +0200 Received: from [141.99.131.109] ([141.99.131.109]) by mailf1.uni-siegen.de with Microsoft SMTPSVC(5.0.2195.6713); Tue, 4 May 2004 17:00:41 +0200 Mime-Version: 1.0 (Apple Message framework v613) Content-Transfer-Encoding: 7bit Message-Id: Content-Type: text/plain; charset=US-ASCII; format=flowed To: caml-list@inria.fr From: Holger Schulz Subject: [Caml-list] Declaration Date: Tue, 4 May 2004 17:00:41 +0200 X-Mailer: Apple Mail (2.613) X-OriginalArrivalTime: 04 May 2004 15:00:41.0631 (UTC) FILETIME=[917D7AF0:01C431E8] X-Loop: caml-list@inria.fr X-Spam: no; 0.00; schulz:99 schulz:99 val:01 val:01 overwrite:01 delivers:99 overwritten:01 ocaml:01 sml:01 sml:01 syntax:02 let:04 let:04 i'd:06 porting:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I've a question on declaration, I've a problem porting something from SML/NJ In SML/Nj i'd declare val x= "fgdsgh"; and than let val x = 2 val y = x+2 in y end; The first declaration would overwrite the x which will be used in the declaration of y. I've look in the Ocaml manual but I only found examples with simultanous declaration like let x ="dhshdjsa";; let x =2 and y= x+2 in y;; which of course delivers a type error, coss x isn't overwritten here. How the syntax for non-simultanous declaration? Thanks hs ------------------- 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