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 1696DBC4E for ; Tue, 8 Aug 2006 23:33:42 +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 k78LXfoW021822 for ; Tue, 8 Aug 2006 23:33: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 XAA31457 for ; Tue, 8 Aug 2006 23:33:41 +0200 (MET DST) Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [192.109.42.8]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k78LXeXv003537 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Tue, 8 Aug 2006 23:33:40 +0200 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from first.in-berlin.de (e178002115.adsl.alicedsl.de [85.178.2.115]) (authenticated bits=0) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id k78LXd14010987 for ; Tue, 8 Aug 2006 23:33:40 +0200 Received: by first.in-berlin.de (Postfix, from userid 501) id EF41A2F732D; Tue, 8 Aug 2006 23:33:59 +0200 (CEST) Date: Tue, 8 Aug 2006 23:33:59 +0200 From: Oliver Bandel To: caml-list@inria.fr Subject: Re: [Caml-list] Arg-module: Float-Args also accept integer values Message-ID: <20060808213359.GA2364@first.in-berlin.de> References: <20060808205748.GA745@first.in-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Miltered: at nez-perce with ID 44D90335.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 44D90334.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; bandel:01 in-berlin:01 bandel:01 ocaml's:01 2006:98 2006,:98 wrote:01 wrote:01 oliver:01 oliver:01 caml-list:01 integer:01 integer:01 behaviour:01 int: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.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 On Tue, Aug 08, 2006 at 03:19:15PM -0600, William D. Neumann wrote: > On Tue, 8 Aug 2006, Oliver Bandel wrote: > > >Is this a wanted behaviour? > >It's an implicit conversion from the integer value in the cli-string > >to float. Even if this is very convenient for a user, it is not > >completely following OCaml's philosophy (regarding types). > > Not really. It's the same behavior as float_of_string (because it uses > float of string). > > # float_of_string "42";; > - : float = 42. > [...] Ah, ok, I see. Thanks! (But.... shouldn't throw this an eception, because it's an int, not a float?!) Ciao, Oliver