Logo

Programming-Idioms

History of Idiom 146 > diff from v13 to v14

Edit summary for version 14 by programming-idioms.org:
[Haskell] Comments

Version 13

2017-09-21, 17:09:36

Version 14

2017-09-28, 22:06:24

Idiom #146 Convert string to floating point number

Extract floating point value f from its string representation s

Idiom #146 Convert string to floating point number

Extract floating point value f from its string representation s

Extra Keywords
real conversion
Extra Keywords
real conversion
Code
read s :: Double
Code
read s :: Double
Comments bubble
s is the String you wan to convert, optionally you can change "Double" to "Float".
Comments bubble
You can convert to Double or to Float.
Doc URL
http://hackage.haskell.org/package/base-4.10.0.0/docs/Prelude.html#v:read
Doc URL
http://hackage.haskell.org/package/base-4.10.0.0/docs/Prelude.html#v:read