Commit 58351e91 authored by Pietro Abate's avatar Pietro Abate

[r2005-05-17 14:42:28 by beppe] typos

Original author: beppe
Date: 2005-05-17 14:42:29+00:00
parent 00f4931f
* Added char_of_int built_in function.
* Now int_of also accepts octal binary and hexadecimals
* Bug fix in configure
......@@ -627,13 +627,22 @@ The operator <code>int_of</code> converts a string to an integer. The string
is read in decimal (by default) or in hexadecimal (if it begins with
<code>0x</code> or <code>0X</code>), octal (if it begins with <code>0o</code>
or <code>0O</code>), or binary (if it begins with <code>0b</code> or
<code>0B</code>).It fails if the string is not a decimal representation of an
<code>0B</code>). It fails if the string is not a decimal representation of an
integer. There is a type-checking warning when the argument cannot be proved
to be of type <code>[ '-'? '0'--'9'+ ] | ['-'? 'O'('b'|'B') '0'--'1'+ ] |
['-'? 'O'('o'|'O') '0'--'7'+ ] | ['-'? 'O'('x'|'X')
('0'--'9'|'a'--'f'|'A'--'F')+] </code>.
<section title="Creating strings from integers">
Besides the built-in function <code>string_of: Any -> Latin1</code>, it is
also possible to create characters, hence strings, from their codepoints:
either by enclosing their code within a backslash (<code>\x</code> for
hexadecimal code) and a semicolon, or by applying the built-in function
<code>char_of_int : Int -> Char</code>.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment