Reading Floats
Simon Peyton-Jones
simonpj at microsoft.com
Mon Oct 6 13:43:44 EDT 2003
It's a definite bug. It'll be fixed in 6.02. Thanks for reporting it.
Simon
| -----Original Message-----
| From: glasgow-haskell-users-bounces at haskell.org
[mailto:glasgow-haskell-users-
| bounces at haskell.org] On Behalf Of ketil+haskell at ii.uib.no
| Sent: 03 October 2003 10:08
| To: glasgow-haskell-users at haskell.org
| Subject: Reading Floats
|
|
| Hi,
|
| I recently encountered something I found a bit peculiar when reading
| floats from strings. Leading zeroes seem okay, as long as there is no
| decimal point. To wit:
|
| Main> (map read ["1.0", "00000", "01", "01.0"]) :: [Float]
| [1.0,0.0,1.0,*** Exception: Prelude.read: no parse
|
| Neither is leading decimal point allowed:
|
| Main> (read ".01") :: Float
| *** Exception: Prelude.read: no parse
|
| Is this how it's supposed to be?
|
| -kzm
| --
| If I haven't seen further, it is by standing in the footprints of
giants
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
More information about the Glasgow-haskell-users
mailing list