Non-decimal radices/Input: Difference between revisions

m
(Nimrod -> Nim)
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.
 
UnfortunatelyStarting in OCaml 4.02, the <code>Big_int.big_int_of_string</code> functionand <code>Num.num_of_string</code> doesfunctions notalso understand these prefixes.
 
You could also use the <code>Scanf</code> module to parse un-prefixed hexadecimal, decimal, and octal numbers (binary not supported):
Anonymous user