[erlang-questions] string:to_lower

Zac Brown <>
Sun Sep 2 16:54:24 CEST 2007


Anthony Shipman wrote:
> 13> string:to_float("0").
> {error,no_float}
> 14> string:to_float("0.0").
> {0.00000e+0,[]}
>
> That's a bit rough!
>   
Hi Anthony:

    From the erlang docs for to_float(String):
                   *Argument |String| is expected to start with a valid
text represented float (the digits being ASCII values). Remaining
characters in the string after the float are returned in |Rest|.

*    It would seem that "0" is not recognized as a float and thats
probably for some management issues in the VM :).


Zac



More information about the erlang-questions mailing list