Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cduce
cduce
Commits
58351e91
Commit
58351e91
authored
Oct 05, 2007
by
Pietro Abate
Browse files
[r2005-05-17 14:42:28 by beppe] typos
Original author: beppe Date: 2005-05-17 14:42:29+00:00
parent
00f4931f
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGES
View file @
58351e91
0.3.2+1
* Added char_of_int built_in function.
* Now int_of also accepts octal binary and hexadecimals
0.3.2
* Bug fix in configure
...
...
web/manual/expressions.xml
View file @
58351e91
...
...
@@ -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>
.
</p>
</section>
<section
title=
"Creating strings from integers"
>
<p>
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>
.
</p>
</section>
</box>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment