Character codes: Difference between revisions

Content added Content deleted
Line 526: Line 526:
Printf.printf "%c\n" (char_of_int 97); (* prints "a" *)</lang>
Printf.printf "%c\n" (char_of_int 97); (* prints "a" *)</lang>


We also have these functions:
The following are aliases for the above functions:
<lang ocaml># Char.code ;;
<lang ocaml># Char.code ;;
- : char -> int = <fun>
- : char -> int = <fun>