Data.Char module
provides ord function, which takes a character and return ASCII value of it.
Prelude> :m Data.Char Prelude Data.Char> Prelude Data.Char> ord 'a' 97 Prelude Data.Char> ord 'b' 98 Prelude Data.Char> ord '@' 64 Prelude Data.Char> ord '`' 96 Prelude Data.Char> :t ord ord :: Char -> Int Prelude Data.Char>
No comments:
Post a Comment