Browse thread
Arg-module: Float-Args also accept integer values
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Oliver Bandel <oliver@f...> |
| Subject: | Re: [Caml-list] Arg-module: Float-Args also accept integer values |
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