Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Arg-module: Float-Args also accept integer values
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: William D. Neumann <wneumann@c...>
Subject: Re: [Caml-list] Arg-module: Float-Args also accept integer values
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.

William D. Neumann


"There's just so many extra children, we could just feed the
children to these tigers.  We don't need them, we're not doing 
anything with them.

Tigers are noble and sleek; children are loud and messy."

         -- Neko Case

Life is unfair.  Kill yourself or get over it.
 	-- Black Box Recorder