Non-decimal radices/Input: Difference between revisions
Content added Content deleted
(Nimrod -> Nim) |
|||
Line 580: | Line 580: | ||
The <code>Int32.of_string</code>, <code>Int64.of_string</code>, and <code>Nativeint.of_string</code> functions also can understand the above prefixes when parsing into their appropriate types. |
The <code>Int32.of_string</code>, <code>Int64.of_string</code>, and <code>Nativeint.of_string</code> functions also can understand the above prefixes when parsing into their appropriate types. |
||
Starting in OCaml 4.02, the <code>Big_int.big_int_of_string</code> and <code>Num.num_of_string</code> functions also understand these prefixes. |
|||
You could also use the <code>Scanf</code> module to parse un-prefixed hexadecimal, decimal, and octal numbers (binary not supported): |
You could also use the <code>Scanf</code> module to parse un-prefixed hexadecimal, decimal, and octal numbers (binary not supported): |