From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id DF533BC29 for ; Wed, 9 Aug 2006 05:30:41 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k793UfUc012153 for ; Wed, 9 Aug 2006 05:30:41 +0200 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 FAA02596 for ; Wed, 9 Aug 2006 05:30:40 +0200 (MET DST) Received: from nz-out-0102.google.com (nz-out-0102.google.com [64.233.162.201]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k793UdMp006864 for ; Wed, 9 Aug 2006 05:30:40 +0200 Received: by nz-out-0102.google.com with SMTP id m22so21601nzf for ; Tue, 08 Aug 2006 20:30:39 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:in-reply-to:to:subject:cc:x-mailer:from:message-id:mime-version:content-type:content-transfer-encoding:date; b=e2Yv+92Cp+ESUWp0fIV3yzfhNcMOP/GQst+Hs0lwQiP5utWgRky8v2YuQpWVl5Hdinqz1UMJx1/Eyj65YOkfVCy9787/HIH3zaWmew49TD0mBkhSwwjT0mwA6lPd95CUrUAXU4vrBPgfWjCP/0Do1lmRLXvgkT4bnoekkNysFtg= Received: by 10.65.240.5 with SMTP id s5mr489789qbr; Tue, 08 Aug 2006 20:30:39 -0700 (PDT) Received: from beos ( [124.197.7.245]) by mx.gmail.com with ESMTP id f18sm269590qba.2006.08.08.20.30.35; Tue, 08 Aug 2006 20:30:37 -0700 (PDT) In-Reply-To: <78109874304-BeMail@beos> To: oliver@first.in-berlin.de Subject: Re: [Caml-list] Arg-module: Float-Args also accept integer values Cc: caml-list@inria.fr X-Mailer: BeMail - Mail Daemon Replacement 3.0.2 Final From: "Jonathan Roewen" Message-Id: <78403809480-BeMail@beos> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Date: Tue, 08 Aug 2006 20:30:37 -0700 (PDT) X-j-chkmail-Score: MSGID : 44D956DF.000 on concorde : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 44D956E1.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44D956DF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 val:01 ocaml:01 impl:01 libs:01 lexing:01 toplevel:01 parses:01 integers:01 compilers:01 oliver:01 caml-list:01 integer:01 expression:01 oops:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=RCVD_BY_IP autolearn=disabled version=3.0.3 > > =========================================== > > first:~ oliver$ ocaml > > Objective Caml version 3.09.2 > > > > # let floatingpoint_id (x:float) = x;; > > val floatingpoint_id : float -> float = > > # floatingpoint_id 42;; > > This expression has type int but is here used with type float > > # > > =========================================== > > float_of_string doesn't use the ocaml type system ;-) Don't know > about > impl details, but it's basically like atof (or whatever it's called) > in > standard C libs. The two are completely separate. Oops, I should clarify: float_of_string doesn't use the ocaml lexing tools that are used in the toplevel, and the compilers themselves. That's why it parses integers. Jonathan