8
6
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
9
<META name="GENERATOR" content="hevea 1.08">
7
<META name="GENERATOR" content="hevea 1.09">
10
8
<LINK rel="stylesheet" type="text/css" href="manual.css">
9
<TITLE>The standard library</TITLE>
16
<A HREF="manual033.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
17
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
18
<A HREF="manual035.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
12
<A HREF="manual033.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
13
<A HREF="index.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
14
<A HREF="manual035.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
21
<H1 CLASS="chapter"><A NAME="htoc252">Chapter 20</A> The standard library</H1> <A NAME="c:stdlib"></A>
23
This chapter describes the functions provided by the Objective Caml
16
<H1 CLASS="chapter"><A NAME="htoc252">Chapter�20</A>��The standard library</H1><P> <A NAME="c:stdlib"></A>
17
</P><P>This chapter describes the functions provided by the Objective Caml
24
18
standard library. The modules from the standard library are
25
19
automatically linked with the user's object code files by the <TT>ocamlc</TT>
26
20
command. Hence, these modules can be used in standalone programs without
27
21
having to add any <TT>.cmo</TT> file on the command line for the linking
28
22
phase. Similarly, in interactive use, these globals can be used in
29
toplevel phrases without having to load any <TT>.cmo</TT> file in memory.<BR>
31
Unlike the <TT>Pervasive</TT> module from the core library, the modules from the
32
standard library are not automatically “opened” when a compilation
23
toplevel phrases without having to load any <TT>.cmo</TT> file in memory.</P><P>Unlike the <TT>Pervasive</TT> module from the core library, the modules from the
24
standard library are not automatically “opened” when a compilation
33
25
starts, or when the toplevel system is launched. Hence it is necessary
34
26
to use qualified identifiers to refer to the functions provided by these
35
modules, or to add <TT>open</TT> directives.<BR>
37
<A NAME="stdlib:top"></A><BR>
40
<H2 CLASS="section">Conventions</H2>
41
For easy reference, the modules are listed below in alphabetical order
27
modules, or to add <TT>open</TT> directives.</P><P><A NAME="stdlib:top"></A></P><H2 CLASS="section">Conventions</H2><P>For easy reference, the modules are listed below in alphabetical order
43
29
For each module, the declarations from its signature are printed
44
30
one by one in typewriter font, followed by a short comment.
45
31
All modules and the identifiers they export are indexed at the end of
50
<li><a HREF="libref/Arg.html"> Module <tt>Arg</tt>: parsing of command line arguments</a>
51
<li><a HREF="libref/Array.html"> Module <tt>Array</tt>: array operations</a>
52
<li><a HREF="libref/ArrayLabels.html"> Module <tt>ArrayLabels</tt>: array operations (with labels)</a>
53
<li><a HREF="libref/Buffer.html"> Module <tt>Buffer</tt>: extensible string buffers</a>
54
<li><a HREF="libref/Callback.html"> Module <tt>Callback</tt>: registering Caml values with the C runtime</a>
55
<li><a HREF="libref/Char.html"> Module <tt>Char</tt>: character operations</a>
56
<li><a HREF="libref/Complex.html"> Module <tt>Complex</tt>: Complex numbers</a>
57
<li><a HREF="libref/Digest.html"> Module <tt>Digest</tt>: MD5 message digest</a>
58
<li><a HREF="libref/Filename.html"> Module <tt>Filename</tt>: operations on file names</a> <img alt="updated" src="updated_tiny.gif">
59
<li><a HREF="libref/Format.html"> Module <tt>Format</tt>: pretty printing</a>
60
<li><a HREF="libref/Gc.html"> Module <tt>Gc</tt>: memory management control and statistics; finalised values</a>
61
<li><a HREF="libref/Genlex.html"> Module <tt>Genlex</tt>: a generic lexical analyzer</a>
62
<li><a HREF="libref/Hashtbl.html"> Module <tt>Hashtbl</tt>: hash tables and hash functions</a>
63
<li><a HREF="libref/Int32.html"> Module <tt>Int32</tt>: 32-bit integers</a> <img alt="updated" src="updated_tiny.gif">
64
<li><a HREF="libref/Int64.html"> Module <tt>Int64</tt>: 64-bit integers</a> <img alt="updated" src="updated_tiny.gif">
65
<li><a HREF="libref/Lazy.html"> Module <tt>Lazy</tt>: deferred computations.</a>
66
<li><a HREF="libref/Lexing.html"> Module <tt>Lexing</tt>: the run-time library for lexers generated by <tt>ocamllex</tt></a>
67
<li><a HREF="libref/List.html"> Module <tt>List</tt>: list operations</a>
68
<li><a HREF="libref/ListLabels.html"> Module <tt>ListLabels</tt>: list operations (with labels)</a>
69
<li><a HREF="libref/Map.html"> Module <tt>Map</tt>: association tables over ordered types</a>
70
<li><a HREF="libref/Marshal.html"> Module <tt>Marshal</tt>: marshaling of data structures</a>
71
<li><a HREF="libref/MoreLabels.html"> Module <tt>MoreLabels</tt>: Include modules <tt>Hashtbl</tt>, <tt>Map</tt> and <tt>Set</tt> with labels</a>
72
<li><a HREF="libref/Nativeint.html"> Module <tt>Nativeint</tt>: processor-native integers</a>
73
<li><a HREF="libref/Oo.html"> Module <tt>Oo</tt>: object-oriented extension</a>
74
<li><a HREF="libref/Parsing.html"> Module <tt>Parsing</tt>: the run-time library for parsers generated by <tt>ocamlyacc</tt></a>
75
<li><a HREF="libref/Printexc.html"> Module <tt>Printexc</tt>: facilities for printing exceptions</a>
76
<li><a HREF="libref/Printf.html"> Module <tt>Printf</tt>: formatting printing functions</a>
77
<li><a HREF="libref/Queue.html"> Module <tt>Queue</tt>: first-in first-out queues</a>
78
<li><a HREF="libref/Random.html"> Module <tt>Random</tt>: pseudo-random number generator (PRNG)</a>
79
<li><a HREF="libref/Scanf.html"> Module <tt>Scanf</tt>: formatted input functions</a>
80
<li><a HREF="libref/Set.html"> Module <tt>Set</tt>: sets over ordered types</a>
81
<li><a HREF="libref/Sort.html"> Module <tt>Sort</tt>: sorting and merging lists</a>
82
<li><a HREF="libref/Stack.html"> Module <tt>Stack</tt>: last-in first-out stacks</a>
83
<li><a HREF="libref/StdLabels.html"> Module <tt>StdLabels</tt>: Include modules <tt>Array</tt>, <tt>List</tt> and <tt>String</tt> with labels</a>
84
<li><a HREF="libref/Stream.html"> Module <tt>Stream</tt>: streams and parsers</a>
85
<li><a HREF="libref/String.html"> Module <tt>String</tt>: string operations</a>
86
<li><a HREF="libref/StringLabels.html"> Module <tt>StringLabels</tt>: string operations (with labels)</a>
87
<li><a HREF="libref/Sys.html"> Module <tt>Sys</tt>: system interface</a> <img alt="updated" src="updated_tiny.gif">
88
<li><a HREF="libref/Weak.html"> Module <tt>Weak</tt>: arrays of weak pointers</a>
94
<A HREF="manual033.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
95
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
96
<A HREF="manual035.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
32
this report.</P><UL CLASS="ftoc2"><LI CLASS="li-links">
33
<A HREF="libref/Arg.html">Module <TT>Arg</TT>: parsing of command line arguments</A>
34
</LI><LI CLASS="li-links"><A HREF="libref/Array.html">Module <TT>Array</TT>: array operations</A>
35
</LI><LI CLASS="li-links"><A HREF="libref/ArrayLabels.html">Module <TT>ArrayLabels</TT>: array operations (with labels)</A>
36
</LI><LI CLASS="li-links"><A HREF="libref/Buffer.html">Module <TT>Buffer</TT>: extensible string buffers</A>
37
</LI><LI CLASS="li-links"><A HREF="libref/Callback.html">Module <TT>Callback</TT>: registering Caml values with the C runtime</A>
38
</LI><LI CLASS="li-links"><A HREF="libref/Char.html">Module <TT>Char</TT>: character operations</A>
39
</LI><LI CLASS="li-links"><A HREF="libref/Complex.html">Module <TT>Complex</TT>: Complex numbers</A>
40
</LI><LI CLASS="li-links"><A HREF="libref/Digest.html">Module <TT>Digest</TT>: MD5 message digest</A>
41
</LI><LI CLASS="li-links"><A HREF="libref/Filename.html">Module <TT>Filename</TT>: operations on file names</A>
42
</LI><LI CLASS="li-links"><A HREF="libref/Format.html">Module <TT>Format</TT>: pretty printing</A>
43
</LI><LI CLASS="li-links"><A HREF="libref/Gc.html">Module <TT>Gc</TT>: memory management control and statistics; finalised values</A>
44
</LI><LI CLASS="li-links"><A HREF="libref/Genlex.html">Module <TT>Genlex</TT>: a generic lexical analyzer</A>
45
</LI><LI CLASS="li-links"><A HREF="libref/Hashtbl.html">Module <TT>Hashtbl</TT>: hash tables and hash functions</A>
46
</LI><LI CLASS="li-links"><A HREF="libref/Int32.html">Module <TT>Int32</TT>: 32-bit integers</A>
47
</LI><LI CLASS="li-links"><A HREF="libref/Int64.html">Module <TT>Int64</TT>: 64-bit integers</A>
48
</LI><LI CLASS="li-links"><A HREF="libref/Lazy.html">Module <TT>Lazy</TT>: deferred computations</A>
49
</LI><LI CLASS="li-links"><A HREF="libref/Lexing.html">Module <TT>Lexing</TT>: the run-time library for lexers generated by <TT>ocamllex</TT></A>
50
</LI><LI CLASS="li-links"><A HREF="libref/List.html">Module <TT>List</TT>: list operations</A>
51
</LI><LI CLASS="li-links"><A HREF="libref/ListLabels.html">Module <TT>ListLabels</TT>: list operations (with labels)</A>
52
</LI><LI CLASS="li-links"><A HREF="libref/Map.html">Module <TT>Map</TT>: association tables over ordered types</A>
53
</LI><LI CLASS="li-links"><A HREF="libref/Marshal.html">Module <TT>Marshal</TT>: marshaling of data structures</A>
54
</LI><LI CLASS="li-links"><A HREF="libref/MoreLabels.html">Module <TT>MoreLabels</TT>: Include modules <TT>Hashtbl</TT>, <TT>Map</TT> and <TT>Set</TT> with labels</A>
55
</LI><LI CLASS="li-links"><A HREF="libref/Nativeint.html">Module <TT>Nativeint</TT>: processor-native integers</A>
56
</LI><LI CLASS="li-links"><A HREF="libref/Oo.html">Module <TT>Oo</TT>: object-oriented extension</A>
57
</LI><LI CLASS="li-links"><A HREF="libref/Parsing.html">Module <TT>Parsing</TT>: the run-time library for parsers generated by <TT>ocamlyacc</TT></A>
58
</LI><LI CLASS="li-links"><A HREF="libref/Printexc.html">Module <TT>Printexc</TT>: facilities for printing exceptions</A>
59
</LI><LI CLASS="li-links"><A HREF="libref/Printf.html">Module <TT>Printf</TT>: formatting printing functions</A>
60
</LI><LI CLASS="li-links"><A HREF="libref/Queue.html">Module <TT>Queue</TT>: first-in first-out queues</A>
61
</LI><LI CLASS="li-links"><A HREF="libref/Random.html">Module <TT>Random</TT>: pseudo-random number generator (PRNG)</A>
62
</LI><LI CLASS="li-links"><A HREF="libref/Scanf.html">Module <TT>Scanf</TT>: formatted input functions</A>
63
</LI><LI CLASS="li-links"><A HREF="libref/Set.html">Module <TT>Set</TT>: sets over ordered types</A>
64
</LI><LI CLASS="li-links"><A HREF="libref/Sort.html">Module <TT>Sort</TT>: sorting and merging lists</A>
65
</LI><LI CLASS="li-links"><A HREF="libref/Stack.html">Module <TT>Stack</TT>: last-in first-out stacks</A>
66
</LI><LI CLASS="li-links"><A HREF="libref/StdLabels.html">Module <TT>StdLabels</TT>: Include modules <TT>Array</TT>, <TT>List</TT> and <TT>String</TT> with labels</A>
67
</LI><LI CLASS="li-links"><A HREF="libref/Stream.html">Module <TT>Stream</TT>: streams and parsers</A>
68
</LI><LI CLASS="li-links"><A HREF="libref/String.html">Module <TT>String</TT>: string operations</A>
69
</LI><LI CLASS="li-links"><A HREF="libref/StringLabels.html">Module <TT>StringLabels</TT>: string operations (with labels)</A>
70
</LI><LI CLASS="li-links"><A HREF="libref/Sys.html">Module <TT>Sys</TT>: system interface</A>
71
</LI><LI CLASS="li-links"><A HREF="libref/Weak.html">Module <TT>Weak</TT>: arrays of weak pointers</A>
73
<A HREF="manual033.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
74
<A HREF="index.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
75
<A HREF="manual035.html"><IMG SRC="next_motif.gif" ALT="Next"></A>