<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
  <head>
    
    <meta http-equiv="Content-Type" content="text/html">
    
    <meta name="GENERATOR" content="hevea 1.05">
    <title>The core library</title>
  </head>
  <body text="black" bgcolor="white">
  <a href="manual030.html"><img src="previous_motif.gif" alt="Previous">
  </a> <a href="index.html"><img src="contents_motif.gif" alt="Contents">
    </a> <a href="manual032.html"><img src="next_motif.gif" alt="Next">
    </a> 
    <hr> 
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#2de52d">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="6">Chapter&#160;18</font></b></td>
		    <td width="100%" align="Center"><b><font size="6"> The core library</font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    <a name="c:stdlib"></a> <br>
    $B$3$N>O$G$O(BObjective Caml core library module$B!'(B<tt>Pervasives</tt> module$B$K$h$jM?$($i$l$k4X?t$K$D$$$F5-=R$9$k!#(B 
    $B$3$N%b%8%e!<%k$O#2$D$N0UL#$GFCJL$G$"$k!#(B 
    <ul>
      <li> $B$3$N%b%8%e!<%k$O(B<tt>ocamlc</tt> $B$K$h$j<+F0E*$K%j%s%/$5$l$k!#(B (chapter&#160;<a href="manual021.html#c:camlc">
	  8</a>).<br>
	<br>
      </li>
      <li> $B$3$N%b%8%e!<%k$O%W%m%0%i%`3+;O;~$K<+F0E*$K(BOpen$B$5$l$k!#$h$C$F(B<tt>Pervasives</tt> module$B$N4X?t$O%/%*%j%U%!%$$7$F$$$J$$4X?t$b;H$&$3$H$,$G$-$^$9!#(B 
      </li>
    </ul>
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#66ff66">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="5">Conventions</font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    <br>
    <tt>Pervasives</tt> module$B$N%7%0%K%A%c$NDj5A$O%3%a%s%H$H$H$b$K$3$N%l%]!<%H$N:G8e$KNs5s$9$k!#(B <br>
    <br>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#66ff66">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="5">18.1</font></b></td>
		    <td width="100%" align="Center"><b><font size="5"> Module </font></b><b><font size="5"><tt>
			    Pervasives</tt></font></b><b><font size="5">: the initially opened module</font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    <br>
    <a name="s:Pervasives"></a> <a name="@manual6"></a><br>
    
    <blockquote> $B$3$N%b%8%e!<%k$O(Bbuilt-in$B$N7?(B($B?t!"??56CM!"J8;zNs!"Nc30!";2>H!"%j%9%H!"G[Ns!"F~=PNO$J$I(B)$B$H$3$l$i$rA`:n$9$k4X?t$rDs6!$9$k!#(B 
      <br>
      <br>
      $B$3$N%b%8%e!<%k$O%3%s%Q%$%k$N$O$8$a$K<+F0E*$K3+$+$l$k!#$h$C$F$3$N%b%8%e!<%k$N%3%s%]%M%s%H$O(B<code>Pervasives</code>$B$rIU$1$:$K;2>H$G$-$k!#(B 
    </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">Predefined types </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>type int<br></pre>
    <blockquote> $B@5?t7?!#(B </blockquote>
    
    <pre>type char<br></pre>
    <blockquote> $BJ8;z7?!#(B </blockquote>
    
    <pre>type string<br></pre>
    <blockquote> $BJ8;zNs7?!#(B </blockquote>
    
    <pre>type float<br></pre>
    <blockquote> $BIbF0>.?tE@7?!#(B </blockquote>
    
    <pre>type bool<br></pre>
    <blockquote> $B??56CM7?!#(B </blockquote>
    
    <pre>type unit = ()<br></pre>
    <blockquote> $B%f%K%C%H7?!#(B </blockquote>
    
    <pre>type exn<br></pre>
    <blockquote> $BNc307?!#(B </blockquote>
    
    <pre>type 'a array<br></pre>
    <blockquote> <code>'a</code>$B7?$NG[Ns7?!#(B </blockquote>
    
    <pre>type 'a list = [] | :: of 'a * 'a list<br></pre>
    <blockquote> <code>'a</code>$B7?$N%j%9%H7?!#(B </blockquote>
    
    <pre>type 'a option = None | Some of 'a<br></pre>
    <blockquote> $B%*%W%7%g%J%k7?!#(B </blockquote>
    
    <pre>type ('a, 'b, 'c) format<br></pre>
    <blockquote> $B%9%H%j%s%0$N%U%)!<%^%C%H!#(B <code>'a</code>$B$O$3$N%U%)!<%^%C%H$N7?0z?t!#(B 
      , <code>'c</code>$B$O(B<code>printf</code>-$B%9%?%$%k$N4X?t$NJV$jCM$N7?!#(B , <code>'b</code>$B$O(B<code>
	%a</code>$B$KM?$($i$l$?:G=i$N0z?t$N7?!#(B  <code>%t</code>$B$O%W%j%s%H4X?t!#(B ( <code>Printf</code>$B%b%8%e!<%k;2>H!#(B).
    </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">Exceptions </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val raise : exn -&gt; 'a<br></pre>
    <a name="@manual7"></a>
    <blockquote> $BM?$($i$l$?Nc30$NCM$r(Braise$B$9$k!#(B </blockquote>
    
    <pre>exception Match_failure of (string * int * int)<br></pre>
    <a name="@manual8"></a>
    <blockquote> $B%Q%?!<%s%^%C%A%s%0$K<:GT$7$?$H$-$K(Braise$B$5$l$k!#0z?t$O%Q%?!<%s%^%C%A%s%0$N>l=j$r5-$7!"%U%!%$%kL>!";O$^$j$N0LCV!"=*$j$N0LCV$G$"$k!#(B 
    </blockquote>
    
    <pre>exception Assert_failure of (string * int * int)<br></pre>
    <a name="@manual9"></a>
    <blockquote> assertion$B$,<:GT$7$?$H$-$KNc30$,(Braise$B$5$l$k!#0z?t$O%Q%?!<%s%^%C%A%s%0$N>l=j$G$"$k!#(BMatch_failure$B$r;2>H!#(B 
    </blockquote>
    
    <pre>exception Invalid_argument of string<br></pre>
    <a name="@manual10"></a>
    <blockquote> $B0z?t$,0UL#$r$J$5$J$$>l9g$K%7%0%J%k$H$7$FNc30$,Ej$2$i$l$k!#(B </blockquote>
    
    <pre>exception Failure of string<br></pre>
    <a name="@manual11"></a>
    <blockquote> $BM?$($i$l$?0z?t$,Dj5A$5$l$F$$$J$$$H$-$K%7%0%J%k$H$7$FNc30$,Ej$2$i$l$k!#(B 
    </blockquote>
    
    <pre>exception Not_found<br></pre>
    <a name="@manual12"></a>
    <blockquote> $BMW5a$5$l$?%*%V%8%'%/%H$,%5!<%A4X?t$K$h$j8+$D$+$i$J$+$C$?>l9g$KEj$2$i$l$k!#(B 
    </blockquote>
    
    <pre>exception Out_of_memory<br></pre>
    <a name="@manual13"></a>
    <blockquote> $B7W;;$9$k$N$K%a%b%j$,B-$j$J$$>l9g$K%,!<%Y%8%3%l%/%?!<$K$h$jEj$2$i$l$k!#(B 
    </blockquote>
    
    <pre>exception Stack_overflow<br></pre>
    <a name="@manual14"></a>
    <blockquote> $B?<$9$.$k:F5"$r9T$C$?:]$K%9%?%C%/NN0h$,B-$j$J$/$J$C$?>l9g$K%P%$%H%3!<%I%$%s%?%W%j%?$K$h$jEj$2$i$l$k!#(B 
    </blockquote>
    
    <pre>exception Sys_error of string<br></pre>
    <a name="@manual15"></a>
    <blockquote> input/output$B4X?t$K$h$j(BOS$B$N%(%i!<$N:]$KEj$2$i$l$k!#(B 
    </blockquote>
    
    <pre>exception End_of_file<br></pre>
    <a name="@manual16"></a>
    <blockquote> input$B4X?t$,%U%!%$%k$N=*$j$KC#$7$?$H$-$K%7%0%J%k$H$7$FEj$2$k!#(B 
    </blockquote>
    
    <pre>exception Division_by_zero<br></pre>
    <a name="@manual17"></a>
    <blockquote> $BBh(B2$B0z?t$,(B0$B$G3d$j;;$,8F$P$l$?$H$-$KEj$2$i$l$k!#(B 
    </blockquote>
    
    <pre>exception Exit<br></pre>
    <a name="@manual18"></a>
    <blockquote> $B$3$NNc30$O%i%$%V%i%j$K$h$jEj$2$i$l$k$N$G$O$J$/%W%m%0%i%`Cf$GDs6!$5$l$k!#(B 
    </blockquote>
    
    <pre>exception Sys_blocked_io<br></pre>
    <a name="@manual19"></a>
    <blockquote> <code>Sys_error</code>
      $B$I$N(BI/O$B$b(B non-blocking I/O channel$B>e$K@.$jN)$?$J$$$H$$$&FCJL$J>l9g$KEj$2$i$l$k!#(B </blockquote>
    
    <pre>val invalid_arg: string -&gt; 'a<br></pre>
    <a name="@manual20"></a>
    <blockquote> $BNc30(B<code>Invalid_argument</code>
      $B$rJ8;zNs$H$H$b$KEj$2$k!#(B </blockquote>
    
    <pre>val failwith: string -&gt; 'a<br></pre>
    <a name="@manual21"></a>
    <blockquote> $BNc30(B<code>
	Failure</code>$B$rJ8;zNs$H$H$b$KEj$2$k!#(B </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  Comparisons </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val (=) : 'a -&gt; 'a -&gt; bool<br></pre>
    <a name="@manual22"></a>
    <blockquote> <code>
	e1 = e2</code>  <code>e1</code> $B$H(B <code>e2</code>$B$N9=B$Ey2A$r3N$+$a$k!#(B $B;2>H$dG[Ns$J$I$N2DJQ$N9=B$$N8=:_$NCM$,9=B$E*$KF1$8$G$"$k>l9g$N$_$K8B$jEy2A$G$"$k$H$9$k!##2$D$N2DJQ%*%V%8%'%/%H$,J*M}E*$KF1$8$G$J$/$H$b$h$$!#(B 
      $B4X?t$,0z?t$K$H$i$l$k$H(B<code>Invalid_argument</code>$B$rEj$2$k!#(B cyclic data$B9=B$$NF)2a@-$O;_$^$i$J$$2DG=@-$,$"$k!#(B 
    </blockquote>
    
    <pre>val (&lt;&gt;) : 'a -&gt; 'a -&gt; bool<br></pre>
    <a name="@manual23"></a>
    <blockquote>  <code>
	(=)</code>$B$NH]Dj(B.  </blockquote>
    
    <pre>val (&lt;) : 'a -&gt; 'a -&gt; bool<br>val (&gt;) : 'a -&gt; 'a -&gt; bool<br>val (&lt;=) : 'a -&gt; 'a -&gt; bool<br>val (&gt;=) : 'a -&gt; 'a -&gt; bool<br></pre>
    <a name="@manual24"></a><a name="@manual25"></a><a name="@manual26"></a><a name="@manual27"></a>
    <blockquote> $B9=B$E*=g=xIU$14X?t!#(B 
      $B$3$l$i$O@0?t!"J8;z!"J8;zNs!"IbF0>.?tE@?t!"$J$I$N=g=xIU$-$N%G!<%?$KMQ$$$i$l$k!#$3$l$r3HD%$7$FA4$F$N7?$N=g=xIU$1$,2DG=$G$"$k!#(B $B=g=xIU$1$O(B<code>
	(=)</code>$B$H8_49@-$,$"$k!#(B <code>(=)</code>$B$G8+$?$H$-$N$h$&$K(B,$B2DJQ$N%G!<%?$N>l9g$OCf?H$GHf$Y$i$l$k!#(B $B4X?t7?$rHf$Y$k$H(B<code>
	Invalid_argument</code>$B$,Ej$2$i$l$k!#(B Cyclic$B$J%G!<%?$rHf3S$9$k$H;_$^$i$J$$!#(B </blockquote>
    
    <pre>val compare: 'a -&gt; 'a -&gt; int<br></pre>
    <a name="@manual28"></a>
    <blockquote> <code>
	compare x y</code> $B$O(B<code>x=y</code>$B$J$i$P(B <code>0</code>$B$r(B,  <code>x&lt;y</code>
      $B$J$i$PIi$N@0?t$r(B,<code>x&gt;y</code>$B$J$i$P@5$N@0?t$rJV$9!#(B <code>=</code>$B$rE,MQ$9$k$H$-$HF1MM$N@)8B$,$"$k(B<code>
	compare</code> $B$OHf3S4X?t$H$7$F(B<code>Set</code> $B$H(B <code>Map</code>$B%b%8%e!<%k$G;H$o$l$k!#(B </blockquote>
    
    <pre>val min: 'a -&gt; 'a -&gt; 'a<br></pre>
    <a name="@manual29"></a>
    <blockquote>
      2$B0z?t$N$&$A$N>.$5$$J}$rJV$9!#(B </blockquote>
    
    <pre>val max: 'a -&gt; 'a -&gt; 'a<br></pre>
    <a name="@manual30"></a>
    <blockquote>
      2$B0z?t$N$&$A$NBg$-$$J}$rJV$9!#(B </blockquote>
    
    <pre>val (==) : 'a -&gt; 'a -&gt; bool<br></pre>
    <a name="@manual31"></a>
    <blockquote>
      <code>e1 == e2</code> <code>e1</code> $B$H(B <code>e2</code>$B$NJ*M}E*Ey2A@-$r%A%'%C%/$9$k!#(B $B@5?t7?!"J8;z7?$N>l9g$O9=B$Ey2A$HF1$8!#2DJQ9=B$$N>l9g$O(B 
      <code>
	e1 == e2</code> $B$O(B <code>e1</code>$B$bJQ99$,(B <code>e2</code>$B$K$b1F6A$rM?$($k$h$&$JJ*M}E*$KF1$8$G$"$k>l9g$K$N$_(Btrue$B$H$J$k!#(B 
      $B2DJQ9=B$$G$J$$>l9g$O(B, <code>(==)</code>$B$NF/$-$O<BAu0MB8$H$J$k!#$=$l0J30$G$O(B <code>e1 == e2</code>$B$O(B<code>
	e1 = e2</code>$B$r0UL#$9$k!#(B </blockquote>
    
    <pre>val (!=) : 'a -&gt; 'a -&gt; bool<br></pre>
    <a name="@manual32"></a>
    <blockquote>
      <code>(==)</code>$B$NH]Dj!#(B </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  Boolean operations </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val not : bool -&gt; bool<br></pre>
    <a name="@manual33"></a>
    <blockquote>
      $B??56CM$NH]Dj!#(B </blockquote>
    
    <pre>val (&amp;&amp;) : bool -&gt; bool -&gt; bool<br>val (&amp;) : bool -&gt; bool -&gt; bool<br></pre>
    <a name="@manual34"></a><a name="@manual35"></a>
    <blockquote>
      $B??56$N(B``and''$B!#I>2A$O:8$+$i1&$X$H9T$o$l$k!#(B <code>e1 &amp;&amp; e2</code>$B$G$O(B<code>e1</code>
      $B$,@h$KI>2A$5$l$3$l$,(Bfalse$B$rJV$9>l9g$O(B<code>e2</code>$B$OI>2A$5$l$J$$!#(B </blockquote>
    
    <pre>val (||) : bool -&gt; bool -&gt; bool<br>val (or) : bool -&gt; bool -&gt; bool<br></pre>
    <a name="@manual36"></a><a name="@manual37"></a>
    <blockquote>
      $B??56$N(B``or''$B!#I>2A$O:8$+$i1&$X$H9T$o$l$k!#(B <code>e1 &amp;&amp; e2</code>$B$G$O(B<code>e1</code>$B$,@h$KI>2A$5$l$3$l$,(Btrue$B$rJV$9>l9g$O(B<code>
	e2</code>$B$OI>2A$5$l$J$$!#(B </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  $B@0?t1i;;(B </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <blockquote>
      $B@0?t$N%S%C%HI}$O(B31$B%S%C%H$G$"$k(B(64$B%S%C%H%W%m%;%C%5$N>l9g$O(B63$B%S%C%H(B). $B$9$Y$F$N7W;;$O(B 
      2<sup><font size="2">31</font></sup>$B$N(Bmodulo($B$^$?$O(B 2<sup><font size="2">
	  63</font></sup>)$B$G9T$J$o$l$k(B. $B%*!<%P!<%U%m!<$K4X$7$F<:GT$O$7$J$$!#(B.  </blockquote>
    
    <pre>val (~-) : int -&gt; int<br></pre>
    <a name="@manual38"></a>
    <blockquote>
      Unary negation. You can also write <code>-e</code> instead of <code>~-e</code>
      .  </blockquote>
    
    <pre>val succ : int -&gt; int<br></pre>
    <a name="@manual39"></a>
    <blockquote>
      <code>succ x</code> $B$O(B <code>x+1</code>$B$HF15A(B.  </blockquote>
    
    <pre>val pred : int -&gt; int<br></pre>
    <a name="@manual40"></a>
    <blockquote>
      <code>pred x</code> $B$O(B <code>x-1</code>$B$HF15A(B.  </blockquote>
    
    <pre>val (+) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual41"></a>
    <blockquote>
      $B@0?t$NOB(B.  </blockquote>
    
    <pre>val (-) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual42"></a>
    <blockquote>
      $B@0?t$N:9(B.  </blockquote>
    
    <pre>val (*) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual43"></a>
    <blockquote>
      $B@0?t$N@Q(B.  </blockquote>
    
    <pre>val (/) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual44"></a>
    <blockquote>
      $B@0?t$N>&(B. $BBh(B2$B0z?t$,(B0$B$N>l9g$O(B<code>Division_by_zero</code>$B$,(Braise$B$5$l$k!#(B
  </blockquote>
    
    <pre>val (mod) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual45"></a>
    <blockquote>
      $B@0?t$NM>$j$N7W;;(B. $B$b$7(B <code>x &gt;= 0</code> and <code>y &gt; 0</code>$B$G$"$k$J$i$P(B,
      <code>x mod y</code>  <code>
	0 &lt;= x mod y &lt; y</code> and <code>x = (x / y) * y + x mod y</code>$B$rK~$?$9(B. 
      $B$b$7(B <code>y = 0</code>$B$J$i$P(B, <code>x mod y</code> $B$O(B <code>Division_by_zero</code>$B$r(B raise$B$9$k!#(B
      .  <code>x &lt; 0</code> $B$^$?$O(B <code>y &lt; 0</code>$B$N>l9g$N(B<code>
	x mod y</code>$B$N7W;;7k2L$O;XDj$5$l$F$*$i$:!"%W%i%C%H%[!<%`0MB8$G$"$k(B.  </blockquote>
    
    <pre>val abs : int -&gt; int<br></pre>
    <a name="@manual46"></a>
    <blockquote>
      $B0z?t$N@0?t$N@dBPCM$rJV$9(B.  </blockquote>
    
    <pre>val max_int: int<br>val min_int: int<br></pre>
    <a name="@manual47"></a><a name="@manual48"></a>
    <blockquote>
      $B;HMQ2DG=$J@0?t$N:GBgCM$H:G>.CM(B.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#98ff98">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b>
			$B%S%C%H1i;;(B </b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val (land) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual49"></a>
    <blockquote>
      <br>
      $B%S%C%H$4$H$NO@M}@Q!#(B<br>
    </blockquote>
    
    <pre>val (lor) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual50"></a>
    <blockquote>
      <br>
      $B%S%C%H$4$H$NO@M}OB!#(B<br>
    </blockquote>
    
    <pre>val (lxor) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual51"></a>
    <blockquote>
      $B%S%C%H$4$H$NGSB>E*O@M}OB!#(B  </blockquote>
    
    <pre>val lnot: int -&gt; int<br></pre>
    <a name="@manual52"></a>
    <blockquote>
      $B%S%C%H$4$H$NO@M}E*H]Dj!#(B  </blockquote>
    
    <pre>val (lsl) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual53"></a>
    <blockquote>
      <code>n lsl m</code>$B$O(B  <code>n</code> $B$r:8$K(B <code>m</code>
      $B%S%C%H%7%U%H$7$?CM$rJV$9(B.  <code>m &lt; 0</code> $B$N>l9g$d(B <code>(m &gt;=
	$B%S%C%H%5%$%:(B)</code>$B$N>l9g$N7k2L$O5,Dj$5$l$F$$$J$$(B, $B$3$3$G$$$&(B<code>$B%S%C%H%5%$%:(B</code> $B$H$O(B32$B%S%C%H%W%i%C%H%[!<%`$N>l9g$O(B <code>32</code> $B$G(B 
      64$B%S%C%H%W%i%C%H%[!<%`$N>l9g$O(B<code>64</code> $B$G$"$k(B.  </blockquote>
    
    <pre>val (lsr) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual54"></a>
    <blockquote>
      <code>n lsr m</code>$B$O(B  <code>n</code> $B$r1&$K(B <code>m</code>
      $B%S%C%H%7%U%H$7$?CM$rJV$9(B.  
      $B$3$l$OO@M}%7%U%H$G$"$k(B: <code>n</code>$B$NId9g$K$h$i$:(B 0$B$,A^F~$5$l$k(B.
       <code>m &lt; 0</code>$B$^$?$O(B
      <code>
	m &gt;= $B%S%C%H%5%$%:(B</code>$B$N>l9g$N7k2L$O5,Dj$5$l$F$$$J$$(B.  </blockquote>
    
    <pre>val (asr) : int -&gt; int -&gt; int<br></pre>
    <a name="@manual55"></a>
    <blockquote>
      <code>n lsr m</code>$B$O(B  <code>n</code> $B$r1&$K(B <code>m</code>
      $B%S%C%H%7%U%H$7$?CM$rJV$9(B.  
      $B$3$l$O;;=Q%7%U%H$G$"$k(B:  <code>n</code>$B$NId9g%S%C%H$,J#@=$5$l$k(B. 
     <code>
	m &gt;= $B%S%C%H%5%$%:(B</code>$B$N>l9g$N7k2L$O5,Dj$5$l$F$$$J$$(B.  </blockquote>
     
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			 $BIbF0>.?t1i;;(B</font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <blockquote>
      Caml$B$O(B IEEE754$B$NI8=`$K=`5r$7$?(B $BG\?t@:EY(B(64$B%S%C%H(B)$B$NIbF0>.?t$rMQ$$$k(B.
      $BIbF0>.?t1i;;$O(B $B%*!<%P!<%U%m!<!"%"%s%@!<%U%m!<!"#0=|;;$J$I$NNc30$O(Braise$B$5$l$J$$!#(B
      $B$=$NBe$o$j$K(B $B$=$l$>$l$N>l9g$KE,@Z$JFCJL$J(BIEEE$B?t$,JV$5$l$k!#(B
      $B$?$H$($P(B <code>1.0
	/. 0.0</code>$B$K$O(B<code>infinity</code> , <code>-1.0 /. 0.0</code>$B$K$O(B<code>neg_infinity</code> ,
      <code>0.0 /. 0.0</code>$B$K$O(B<code>	nan</code> (``not a number'')$B$,$=$l$>$lJV$5$l$k(B . 
      $B$3$l$i$NFCJL$J?tCM$O(B
      $BIbF0>.?tE@1i;;$K<+A3$KE,MQ$5$l$k!#Nc$r5s$2$k$H(B<code>1.0 /. infinity</code> $B$O(B <code>0.0</code>$B$K$J$j(B, 
       <code>nan</code>$B$r0z?t$K$H$k7W;;$O$9$Y$F(B<code>nan</code>$B$rJV$9(B.  </blockquote>
    
    <pre>val (~-.) : float -&gt; float<br></pre>
    <a name="@manual56"></a>
    <blockquote>
      Unary negation. You can also write <code>-.e</code> instead of <code>~-.e</code>
      .  </blockquote>
    
    <pre>val (+.) : float -&gt; float -&gt; float<br></pre>
    <a name="@manual57"></a>
    <blockquote>
      Floating-point addition  </blockquote>
    
    <pre>val (-.) : float -&gt; float -&gt; float<br></pre>
    <a name="@manual58"></a>
    <blockquote>
      Floating-point subtraction  </blockquote>
    
    <pre>val (*.) : float -&gt; float -&gt; float<br></pre>
    <a name="@manual59"></a>
    <blockquote>
      Floating-point multiplication  </blockquote>
    
    <pre>val (/.) : float -&gt; float -&gt; float<br></pre>
    <a name="@manual60"></a>
    <blockquote>
      Floating-point division.  </blockquote>
    
    <pre>val (**) : float -&gt; float -&gt; float<br></pre>
    <a name="@manual61"></a>
    <blockquote>
      Exponentiation  </blockquote>
    
    <pre>val sqrt : float -&gt; float<br></pre>
    <a name="@manual62"></a>
    <blockquote>
      Square root  </blockquote>
    
    <pre>val exp : float -&gt; float<br>val log : float -&gt; float<br>val log10 : float -&gt; float<br></pre>
    <a name="@manual63"></a><a name="@manual64"></a><a name="@manual65"></a>
    <blockquote>
      Exponential, natural logarithm, base 10 logarithm.  </blockquote>
    
    <pre>val cos : float -&gt; float<br>val sin : float -&gt; float<br>val tan : float -&gt; float<br>val acos : float -&gt; float<br>val asin : float -&gt; float<br>val atan : float -&gt; float<br>val atan2 : float -&gt; float -&gt; float<br></pre>
    <a name="@manual66"></a><a name="@manual67"></a><a name="@manual68"></a><a name="@manual69"></a><a name="@manual70"></a><a name="@manual71"></a><a name="@manual72"></a>
    <blockquote>
      The usual trigonometric functions  </blockquote>
    
    <pre>val cosh : float -&gt; float<br>val sinh : float -&gt; float<br>val tanh : float -&gt; float<br></pre>
    <a name="@manual73"></a><a name="@manual74"></a><a name="@manual75"></a>
    <blockquote>
      The usual hyperbolic trigonometric functions  </blockquote>
    
    <pre>val ceil : float -&gt; float<br>val floor : float -&gt; float<br></pre>
    <a name="@manual76"></a><a name="@manual77"></a>
    <blockquote>
      Round the given float to an integer value. <code>floor f</code> returns
      the greatest integer value less than or equal to <code>f</code>. <code>ceil
	f</code> returns the least integer value greater than or equal to <code>f</code>
      .  </blockquote>
    
    <pre>val abs_float : float -&gt; float<br></pre>
    <a name="@manual78"></a>
    <blockquote>
      Return the absolute value of the argument.  </blockquote>
    
    <pre>val mod_float : float -&gt; float -&gt; float<br></pre>
    <a name="@manual79"></a>
    <blockquote>
      <code>mod_float a b</code> returns the remainder of <code>a</code> with
      respect to <code>b</code>. The returned value is <code>a -. n *. b</code>
      , where <code>n</code> is the quotient <code>a /. b</code> rounded towards
      zero to an integer.  </blockquote>
    
    <pre>val frexp : float -&gt; float * int<br></pre>
    <a name="@manual80"></a>
    <blockquote>
      <code>frexp f</code> returns the pair of the significant and the exponent
      of <code>f</code>. When <code>f</code> is zero, the significant <code>x</code>
      and the exponent <code>n</code> of <code>f</code> are equal to zero. When
      <code>
	f</code> is non-zero, they are defined by <code>f = x *. 2 ** n</code> and
      <code>
	0.5 &lt;= x &lt; 1.0</code>.  </blockquote>
    
    <pre>val ldexp : float -&gt; int -&gt; float<br></pre>
    <a name="@manual81"></a>
    <blockquote>
      <code>ldexp x n</code> returns <code>x *. 2 ** n</code>.  </blockquote>
    
    <pre>val modf : float -&gt; float * float<br></pre>
    <a name="@manual82"></a>
    <blockquote>
      <code>modf f</code> returns the pair of the fractional and integral part
      of <code>f</code>.  </blockquote>
    
    <pre>val float : int -&gt; float<br>val float_of_int : int -&gt; float<br></pre>
    <a name="@manual83"></a><a name="@manual84"></a>
    <blockquote>
      Convert an integer to floating-point.  </blockquote>
    
    <pre>val truncate : float -&gt; int<br>val int_of_float : float -&gt; int<br></pre>
    <a name="@manual85"></a><a name="@manual86"></a>
    <blockquote>
      Truncate the given floating-point number to an integer. The result is unspecified
      if it falls outside the range of representable integers.  </blockquote>
    
    <pre>val infinity: float<br></pre>
    <a name="@manual87"></a>
    <blockquote>
      Positive infinity.  </blockquote>
    
    <pre>val neg_infinity: float<br></pre>
    <a name="@manual88"></a>
    <blockquote>
      Negative infinity.  </blockquote>
    
    <pre>val nan: float<br></pre>
    <a name="@manual89"></a>
    <blockquote>
      A special floating-point value denoting the result of an undefined operation
      such as <code>0.0 /. 0.0</code>. Stands for ``not a number''.  </blockquote>
    
    <pre>type fpclass =<br>    FP_normal           (* Normal number, none of the below *)<br>  | FP_subnormal        (* Number very close to 0.0, has reduced precision *)<br>  | FP_zero             (* Number is 0.0 or -0.0 *)<br>  | FP_infinite         (* Number is positive or negative infinity *)<br>  | FP_nan              (* Not a number: result of an undefined operation *)<br></pre>
    <blockquote>
      The five classes of floating-point numbers, as determined by the <code>classify_float</code>
      function.  </blockquote>
    
    <pre>val classify_float: float -&gt; fpclass<br></pre>
    <a name="@manual90"></a>
    <blockquote>
      Return the class of the given floating-point number: normal, subnormal,
      zero, infinite, or not a number.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  String operations </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <blockquote>
      More string operations are provided in module <code>String</code>.  </blockquote>
    
    <pre>val (^) : string -&gt; string -&gt; string<br></pre>
    <a name="@manual91"></a>
    <blockquote>
      $BJ8;zNs$N7k9g!#(B  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  Character operations </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <blockquote>
      More character operations are provided in module <code>Char</code>.  </blockquote>
    
    <pre>val int_of_char : char -&gt; int<br></pre>
    <a name="@manual92"></a>
    <blockquote>
      $BJ8;z$N%"%9%-!<%3!<%I$rJV$9!#(B  </blockquote>
    
    <pre>val char_of_int : int -&gt; char<br></pre>
    <a name="@manual93"></a>
    <blockquote>
      Return the character with the given ASCII code. Raise <code>Invalid_argument
	"char_of_int"</code> if the argument is outside the range 0--255.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  Unit operations </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val ignore : 'a -&gt; unit<br></pre>
    <a name="@manual94"></a>
    <blockquote>
      Discard the value of its argument and return <code>()</code>. For instance,
      <code>
	ignore(f x)</code> discards the result of the side-effecting function <code>
	f</code>. It is equivalent to <code>f x; ()</code>, except that the latter
      may generate a compiler warning; writing <code>ignore(f x)</code> instead 
      avoids the warning.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  String conversion functions </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val string_of_bool : bool -&gt; string<br></pre>
    <a name="@manual95"></a>
    <blockquote>
      $B??56CM$rI=$9J8;zNs$rJV$9!#(B  </blockquote>
    
    <pre>val bool_of_string : string -&gt; bool<br></pre>
    <a name="@manual96"></a>
    <blockquote>
      Convert the given string to a boolean. Raise <code>Invalid_argument "bool_of_string"</code>
      if the string is not <code>"true"</code> or <code>"false"</code>.  </blockquote>
    
    <pre>val string_of_int : int -&gt; string<br></pre>
    <a name="@manual97"></a>
    <blockquote>
      Return the string representation of an integer, in decimal.  </blockquote>
    
    <pre>val int_of_string : string -&gt; int<br></pre>
    <a name="@manual98"></a>
    <blockquote>
      Convert the given string to an integer. The string is read in decimal (by
      default) or in hexadecimal, octal or binary if the string begins with <code>
	0x</code>, <code>0o</code> or <code>0b</code> respectively. Raise <code>Failure
	"int_of_string"</code> if the given string is not a valid representation
      of an integer.  </blockquote>
    
    <pre>val string_of_float : float -&gt; string<br></pre>
    <a name="@manual99"></a>
    <blockquote>
      Return the string representation of a floating-point number.  </blockquote>
    
    <pre>val float_of_string : string -&gt; float<br></pre>
    <a name="@manual100"></a>
    <blockquote>
      Convert the given string to a float. The result is unspecified if the given
      string is not a valid representation of a float.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  Pair operations </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val fst : 'a * 'b -&gt; 'a<br></pre>
    <a name="@manual101"></a>
    <blockquote>
      Return the first component of a pair.  </blockquote>
    
    <pre>val snd : 'a * 'b -&gt; 'b<br></pre>
    <a name="@manual102"></a>
    <blockquote>
      Return the second component of a pair.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  List operations </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <blockquote>
      More list operations are provided in module <code>List</code>.  </blockquote>
    
    <pre>val (@) : 'a list -&gt; 'a list -&gt; 'a list<br></pre>
    <a name="@manual103"></a>
    <blockquote>
      List concatenation.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  Input/output </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>type in_channel<br>type out_channel<br></pre>
    <blockquote>
      $B%$%s%W%C%H%A%c%s%M%k$H%"%&%H%W%C%H%A%c%s%M%k$N7?!#(B </blockquote>
    
    <pre>val stdin : in_channel<br>val stdout : out_channel<br>val stderr : out_channel<br></pre>
    <a name="@manual104"></a><a name="@manual105"></a><a name="@manual106"></a>
    <blockquote>
      $B$=$N%W%m%;%9$NI8=`F~NO!"I8=`=PNO!"I8=`%(%i!<=PNO!#(B </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#98ff98">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b>
			Output functions on standard output </b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val print_char : char -&gt; unit<br></pre>
    <a name="@manual107"></a>
    <blockquote>
      $BI8=`=PNO$KJ8;z$r%W%j%s%H!#(B </blockquote>
    
    <pre>val print_string : string -&gt; unit<br></pre>
    <a name="@manual108"></a>
    <blockquote>
      $BI8=`=PNO$KJ8;zNs$rEG$/!#(B </blockquote>
    
    <pre>val print_int : int -&gt; unit<br></pre>
    <a name="@manual109"></a>
    <blockquote>
      $BI8=`=PNO$K(B10$B?J?t$G@0?t$rI=<(!#(B </blockquote>
    
    <pre>val print_float : float -&gt; unit<br></pre>
    <a name="@manual110"></a>
    <blockquote>
      $BI8=`=PNO$K(B10$B?J?t$GIbF0>.?tE@$rI=<(!#(B </blockquote>
    
    <pre>val print_endline : string -&gt; unit<br></pre>
    <a name="@manual111"></a>
    <blockquote>
      $B%9%H%j%s%0$r2~9TJ8;zIU$-$GI8=`=PNO$KI=<(!#(B </blockquote>
    
    <pre>val print_newline : unit -&gt; unit<br></pre>
    <a name="@manual112"></a>
    <blockquote>
      $BI8=`=PNO$K2~9TJ8;z$r=q$-!"I8=`=PNO$r%U%i%C%7%e$9$k!#(B $B$3$l$OI8=`=PNO$r%i%$%s%P%C%U%!$H$7$F%7%_%e%l!<%H$9$k$3$H$r2DG=$H$9$k!#(B </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#98ff98">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b>
			$BI8=`%(%i!<=PNO$X$N=PNO4X?t!#(B </b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val prerr_char : char -&gt; unit<br></pre>
    <a name="@manual113"></a>
    <blockquote>
      $BI8=`%(%i!<=PNO$KJ8;z$r=PNO!#(B  </blockquote>
    
    <pre>val prerr_string : string -&gt; unit<br></pre>
    <a name="@manual114"></a>
    <blockquote>
      Print a string on standard error.  </blockquote>
    
    <pre>val prerr_int : int -&gt; unit<br></pre>
    <a name="@manual115"></a>
    <blockquote>
      Print an integer, in decimal, on standard error.  </blockquote>
    
    <pre>val prerr_float : float -&gt; unit<br></pre>
    <a name="@manual116"></a>
    <blockquote>
      Print a floating-point number, in decimal, on standard error.  </blockquote>
    
    <pre>val prerr_endline : string -&gt; unit<br></pre>
    <a name="@manual117"></a>
    <blockquote>
      Print a string, followed by a newline character on standard error and flush
      standard error.  </blockquote>
    
    <pre>val prerr_newline : unit -&gt; unit<br></pre>
    <a name="@manual118"></a>
    <blockquote>
      Print a newline character on standard error, and flush standard error.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#98ff98">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b>
			$BI8=`F~NO$+$i$NF~NO!#(B</b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val read_line : unit -&gt; string<br></pre>
    <a name="@manual119"></a>
    <blockquote>
      Flush standard output, then read characters from standard input until a
      newline character is encountered. Return the string of all characters read,
      without the newline character at the end.  </blockquote>
    
    <pre>val read_int : unit -&gt; int<br></pre>
    <a name="@manual120"></a>
    <blockquote>
      Flush standard output, then read one line from standard input and convert
      it to an integer. Raise <code>Failure "int_of_string"</code> if the line
      read is not a valid representation of an integer.  </blockquote>
    
    <pre>val read_float : unit -&gt; float<br></pre>
    <a name="@manual121"></a>
    <blockquote>
      Flush standard output, then read one line from standard input and convert
      it to a floating-point number. The result is unspecified if the line read
      is not a valid representation of a floating-point number.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#98ff98">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b>
			$B0lHLE*$J=PNO4X?t(B </b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>type open_flag =<br>    Open_rdonly | Open_wronly | Open_append<br>  | Open_creat | Open_trunc | Open_excl<br>  | Open_binary | Open_text | Open_nonblock<br></pre>
    <blockquote>
      <code>open_out_gen</code> $B$H(B <code>open_in_gen</code>$B$N$?$a$N%U%!%$%k$N%*!<%W%s%b!<%I!#(B<br>
      <code>
	Open_rdonly</code>: $BFI$_9~$_MQ!#(B<br>
      <code>
	Open_wronly</code>: $B=q$-9~$_MQ!#(B<br>
      <code>
	Open_append</code>: $BDI5-MQ!#(B<br>
      <code>
	Open_creat</code>: $B%U%!%$%k$,L5$+$C$?>l9g$N:n@.MQ!#(B<br>
      <code>
	Open_trunc</code>: empty the file if it already exists.<br>
      <code>
	Open_excl</code>: fail if the file already exists.<br>
      <code>
	Open_binary</code>: open in binary mode (no conversion).<br>
      <code>
	Open_text</code>: open in text mode (may perform conversions).<br>
      <code>
	Open_nonblock</code>: open in non-blocking mode.  </blockquote>
    
    <pre>val open_out : string -&gt; out_channel<br></pre>
    <blockquote><br>
      $B;XDj$5$l$?L>A0$N%U%!%$%k$r=PNOMQ$K3+$/!#%]%8%7%g%s$O%U%!%$%k$N;O$a$NItJ,$H$J$k!#$b$7%U%!%$%k$,4{$KB8:_$7$F$$$?$i$3$N%U%!%$%k$ND9$5$O#0$K$5$l$k!#$b$7%U%!%$%k$,B8:_$7$F$$$J$+$C$?$i?7$7$/:n$i$l$k!#%U%!%$%k$,3+$1$J$$>l9g$O(BSys_error$B$,%l%$%:$5$l$k!#(B
    </blockquote>
    
    <pre>val open_out_bin : string -&gt; out_channel<br></pre>
    <a name="@manual123"></a>
    <blockquote>
      Same as <code>open_out</code>, but the file is opened in binary mode, so
      that no translation takes place during writes. On operating systems that
      do not distinguish between text mode and binary mode, this function behaves
      like <code>open_out</code>.  </blockquote>
    
    <pre>val open_out_gen : mode:open_flag list -&gt; perm:int -&gt; string -&gt; out_channel<br></pre>
    <a name="@manual124"></a>
    <blockquote>
      Open the named file for writing, as above. The extra argument <code>mode</code>
      specify the opening mode. The extra argument <code>perm</code> specifies 
      the file permissions, in case the file must be created. <code>open_out</code>
      and <code>open_out_bin</code> are special cases of this function.  </blockquote>
    
    <pre>val flush : out_channel -&gt; unit<br></pre>
    <a name="@manual125"></a>
    <blockquote>
      $B$=$N%A%c%s%M%k$N%P%C%U%!$r%U%i%C%7%e$7%A%c%s%M%k$K=q$-9~$`!#%$%s%?%i%/%F%#%V$J%W%m%0%i%`$N>l9g$OJbI8=`=PNO$dI8=`%(%i!<=PNO$K=q$-9~$`%?%$%_%s%0$K5$$r$D$1$J$/$F$O$J$i$J$$!#(B
    </blockquote>
    
    <pre>val output_char : out_channel -&gt; char -&gt; unit<br></pre>
    <a name="@manual126"></a>
    <blockquote>
      Write the character on the given output channel.  </blockquote>
    
    <pre>val output_string : out_channel -&gt; string -&gt; unit<br></pre>
    <a name="@manual127"></a>
    <blockquote>
      Write$B%"%&%H%W%C%H%A%c%s%M%k$KJ8;zNs$r=q$-9~$`!#(B  </blockquote>
    
    <pre>val output : out_channel -&gt; buf:string -&gt; pos:int -&gt; len:int -&gt; unit<br></pre>
    <a name="@manual128"></a>
    <blockquote>
      Write <code>len</code> characters from string <code>buf</code>, starting
      at offset <code>pos</code>, to the given output channel. Raise <code>Invalid_argument
	"output"</code> if <code>pos</code> and <code>len</code> do not designate
      a valid substring of <code>buf</code>.  </blockquote>
    
    <pre>val output_byte : out_channel -&gt; int -&gt; unit<br></pre>
    <a name="@manual129"></a>
    <blockquote>
      Write one 8-bit integer (as the single character with that code) on the
      given output channel. The given integer is taken modulo 256.  </blockquote>
    
    <pre>val output_binary_int : out_channel -&gt; int -&gt; unit<br></pre>
    <a name="@manual130"></a>
    <blockquote>
      Write one integer in binary format on the given output channel. The only
      reliable way to read it back is through the <code>input_binary_int</code>
      function. The format is compatible across all machines for a given version
      of Objective Caml.  </blockquote>
    
    <pre>val output_value : out_channel -&gt; 'a -&gt; unit<br></pre>
    <a name="@manual131"></a>
    <blockquote>
      Write the representation of a structured value of any type to a channel.
      Circularities and sharing inside the value are detected and preserved. The
      object can be read back, by the function <code>input_value</code>. See the
      description of module <code>Marshal</code> for more information. <code>output_value</code>
      is equivalent to <code>Marshal.to_channel</code> with an empty list of flags.
    </blockquote>
    
    <pre>val seek_out : out_channel -&gt; int -&gt; unit<br></pre>
    <a name="@manual132"></a>
    <blockquote>
      <code>seek_out chan pos</code> sets the current writing position to <code>
	pos</code> for channel <code>chan</code>. This works only for regular files.
      On files of other kinds (such as terminals, pipes and sockets), the behavior
      is unspecified.  </blockquote>
    
    <pre>val pos_out : out_channel -&gt; int<br></pre>
    <a name="@manual133"></a>
    <blockquote>
      Return the current writing position for the given channel.  </blockquote>
    
    <pre>val out_channel_length : out_channel -&gt; int<br></pre>
    <a name="@manual134"></a>
    <blockquote>
      Return the total length (number of characters) of the given channel. This
      works only for regular files. On files of other kinds, the result is meaningless.
    </blockquote>
    
    <pre>val close_out : out_channel -&gt; unit<br></pre>
    <a name="@manual135"></a>
    <blockquote>
      Close the given channel, flushing all buffered write operations. A <code>
	Sys_error</code> exception is raised if any of the functions above is called
      on a closed channel.  </blockquote>
    
    <pre>val set_binary_mode_out : out_channel -&gt; bool -&gt; unit<br></pre>
    <a name="@manual136"></a>
    <blockquote>
      <code>set_binary_mode_out oc true</code> sets the channel <code>oc</code>
      to binary mode: no translations take place during output. <code>set_binary_mode_out
	oc false</code> sets the channel <code>oc</code> to text mode: depending
      on the operating system, some translations may take place during output.
      For instance, under Windows, end-of-lines will be translated from <code>\n</code>
      to <code>\r\n</code>. This function has no effect under operating systems
      that do not distinguish between text mode and binary mode.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#98ff98">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b>
			$B0lHLE*$JF~NO4X?t(B </b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val open_in : string -&gt; in_channel<br></pre>
    <a name="@manual137"></a>
    <blockquote>
      $BJ8;zNs$K$h$j<($5$l$?%U%!%$%k$rFI$_9~$_MQ$K3+$-!"$=$NF~NO%A%c%s%M%k$rJV$9!#%]%8%7%g%s$O%U%!%$%k$N:G=i$K$5$l$F$$$k!#%U%!%$%k$r3+$1$J$$>l9g$O(BSys_error$B$,%l%$%:$5$l$k!#(B
    </blockquote>
    
    <pre>val open_in_bin : string -&gt; in_channel<br></pre>
    <a name="@manual138"></a>
    <blockquote>
      Same as <code>open_in</code>, but the file is opened in binary mode, so
      that no translation takes place during reads. On operating systems that do
      not distinguish between text mode and binary mode, this function behaves
      like <code>open_in</code>.  </blockquote>
    
    <pre>val open_in_gen : mode:open_flag list -&gt; perm:int -&gt; string -&gt; in_channel<br></pre>
    <a name="@manual139"></a>
    <blockquote>
      Open the named file for reading, as above. The extra arguments <code>mode</code>
      and <code>perm</code> specify the opening mode and file permissions. <code>
	open_in</code> and <code>open_in_bin</code> are special cases of this function.
    </blockquote>
    
    <pre>val input_char : in_channel -&gt; char<br></pre>
    <a name="@manual140"></a>
    <blockquote>
      Read one character from the given input channel. Raise <code>End_of_file</code>
      if there are no more characters to read.  </blockquote>
    
    <pre>val input_line : in_channel -&gt; string<br></pre>
    <a name="@manual141"></a>
    <blockquote>
      Read characters from the given input channel, until a newline character
      is encountered. Return the string of all characters read, without the newline
      character at the end. Raise <code>End_of_file</code> if the end of the file
      is reached at the beginning of line.  </blockquote>
    
    <pre>val input : in_channel -&gt; buf:string -&gt; pos:int -&gt; len:int -&gt; int<br></pre>
    <a name="@manual142"></a>
    <blockquote>
      Read up to <code>len</code> characters from the given channel, storing them
      in string <code>buf</code>, starting at character number <code>pos</code>
      . It returns the actual number of characters read, between 0 and <code>len</code>
      (inclusive). A return value of 0 means that the end of file was reached. 
      A return value between 0 and <code>len</code> exclusive means that not all
      requested <code>len</code> characters were read, either because no more characters
      were available at that time, or because the implementation found it convenient
      to do a partial read; <code>input</code> must be called again to read the
      remaining characters, if desired. (See also <code>Pervasives.really_input</code>
      for reading exactly <code>len</code> characters.) Exception <code>Invalid_argument
	"input"</code> is raised if <code>pos</code> and <code>len</code> do not
      designate a valid substring of <code>buf</code>.  </blockquote>
    
    <pre>val really_input : in_channel -&gt; buf:string -&gt; pos:int -&gt; len:int -&gt; unit<br></pre>
    <a name="@manual143"></a>
    <blockquote>
      Read <code>len</code> characters from the given channel, storing them in 
      string <code>buf</code>, starting at character number <code>pos</code>. Raise
      <code>
	End_of_file</code> if the end of file is reached before <code>len</code> characters
      have been read. Raise <code>Invalid_argument "really_input"</code> if <code>
	pos</code> and <code>len</code> do not designate a valid substring of <code>
	buf</code>.  </blockquote>
    
    <pre>val input_byte : in_channel -&gt; int<br></pre>
    <a name="@manual144"></a>
    <blockquote>
      Same as <code>input_char</code>, but return the 8-bit integer representing 
      the character. Raise <code>End_of_file</code> if an end of file was reached.
    </blockquote>
    
    <pre>val input_binary_int : in_channel -&gt; int<br></pre>
    <a name="@manual145"></a>
    <blockquote>
      Read an integer encoded in binary format from the given input channel. See
      <code>
	output_binary_int</code>. Raise <code>End_of_file</code> if an end of file
      was reached while reading the integer.  </blockquote>
    
    <pre>val input_value : in_channel -&gt; 'a<br></pre>
    <a name="@manual146"></a>
    <blockquote>
      Read the representation of a structured value, as produced by <code>output_value</code>
      , and return the corresponding value. This function is identical to <code>
	Marshal.from_channel</code>; see the description of module <code>Marshal</code>
      for more information, in particular concerning the lack of type safety.
    </blockquote>
    
    <pre>val seek_in : in_channel -&gt; int -&gt; unit<br></pre>
    <a name="@manual147"></a>
    <blockquote>
      <code>seek_in chan pos</code> sets the current reading position to <code>
	pos</code> for channel <code>chan</code>. This works only for regular files.
      On files of other kinds, the behavior is unspecified.  </blockquote>
    
    <pre>val pos_in : in_channel -&gt; int<br></pre>
    <a name="@manual148"></a>
    <blockquote>
      Return the current reading position for the given channel.  </blockquote>
    
    <pre>val in_channel_length : in_channel -&gt; int<br></pre>
    <a name="@manual149"></a>
    <blockquote>
      Return the total length (number of characters) of the given channel. This
      works only for regular files. On files of other kinds, the result is meaningless.
    </blockquote>
    
    <pre>val close_in : in_channel -&gt; unit<br></pre>
    <a name="@manual150"></a>
    <blockquote>
      Close the given channel. A <code>Sys_error</code> exception is raised if
      any of the functions above is called on a closed channel.  </blockquote>
    
    <pre>val set_binary_mode_in : in_channel -&gt; bool -&gt; unit<br></pre>
    <a name="@manual151"></a>
    <blockquote>
      <code>set_binary_mode_in ic true</code> sets the channel <code>ic</code>
      to binary mode: no translations take place during input. <code>set_binary_mode_out
	ic false</code> sets the channel <code>ic</code> to text mode: depending
      on the operating system, some translations may take place during input. For
      instance, under Windows, end-of-lines will be translated from <code>\r\n</code>
      to <code>\n</code>. This function has no effect under operating systems
      that do not distinguish between text mode and binary mode.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  References </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>type 'a ref = { mutable contents: 'a }<br></pre>
    <blockquote>
      The type of references (mutable indirection cells) containing a value of
      type <code>'a</code>.  </blockquote>
    
    <pre>val ref : 'a -&gt; 'a ref<br></pre>
    <a name="@manual152"></a>
    <blockquote>
      Return a fresh reference containing the given value.  </blockquote>
    
    <pre>val (!) : 'a ref -&gt; 'a<br></pre>
    <a name="@manual153"></a>
    <blockquote>
      <code>!r</code> returns the current contents of reference <code>r</code>
      . Equivalent to <code>fun r -&gt; r.contents</code>.  </blockquote>
    
    <pre>val (:=) : 'a ref -&gt; 'a -&gt; unit<br></pre>
    <a name="@manual154"></a>
    <blockquote>
      <code>r := a</code> stores the value of <code>a</code> in reference <code>
	r</code>. Equivalent to <code>fun r v -&gt; r.contents &lt;- v</code>.  </blockquote>
    
    <pre>val incr : int ref -&gt; unit<br></pre>
    <a name="@manual155"></a>
    <blockquote>
      Increment the integer contained in the given reference. Equivalent to <code>
	fun r -&gt; r := succ !r</code>.  </blockquote>
    
    <pre>val decr : int ref -&gt; unit<br></pre>
    <a name="@manual156"></a>
    <blockquote>
      Decrement the integer contained in the given reference. Equivalent to <code>
	fun r -&gt; r := pred !r</code>.  </blockquote>
    
    <table cellpadding="0" cellspacing="0" width="100%">
      <tbody>
	<tr>
	  <td bgcolor="#7fff7f">
	    <div align="Center">
	      <table>
		<tbody>
		  <tr>
		    <td><b><font size="4">
			  Program termination </font></b></td>
		  </tr>
		</tbody>
	      </table>
	    </div>
	  </td>
	</tr>
      </tbody>
    </table>
    
    <pre>val exit : int -&gt; 'a<br></pre>
    <a name="@manual157"></a>
    <blockquote>
      Flush all pending writes on <code>stdout</code> and <code>stderr</code>, 
      and terminate the process, returning the given status code to the operating
      system (usually 0 to indicate no errors, and a small positive integer to
      indicate failure.)  An implicit <code>exit 0</code> is performed each time
      a program terminates normally (but not if it terminates because of an uncaught
      exception).  </blockquote>
    
    <pre>val at_exit: (unit -&gt; unit) -&gt; unit<br></pre>
    <a name="@manual158"></a>
    <blockquote>
      Register the given function to be called at program termination time. The
      functions registered with <code>at_exit</code> will be called when the program
      executes <code>exit</code>.  They will not be called if the program terminates
      because of an uncaught exception. The functions are called in ``last in,
      first out'' order: the function most recently added with <code>at_exit</code>
      is called first.  </blockquote>
    
    <hr>
    <a href="manual030.html"><img src="previous_motif.gif" alt="Previous">
    </a>
    <a href="index.html"><img src="contents_motif.gif" alt="Contents">
    </a>
    <a href="manual032.html"><img src="next_motif.gif" alt="Next">
    </a>
    
  </body>
  <div style=" padding : 5px; margin : 20px; border : solid 1px red ; ">
    <div style=" color : red; ">
      Caution!
    </div>
    $B$3$NJ8>O$O(B<a href="mailto:ganat@yl.is.s.u-tokyo.ac.jp">$B1JED(B</a>$B$,<+J,%a%b$N$?$a$K(B<a href="http://caml.inria.fr/ocaml/htmlman/">Ocaml$B$N(BUser's manual</a>$B$r>!<j$KF|K\8l$KLu$7$?$b$N$G$9!#Cx:n7oEy$NLdBj$,$"$l$PE15n$7$^$9!#Lu$7$+$?$KLdBj$,$"$C$?$iKM$K%a!<%k$rAw$C$F$$$?$@$$$F$bNI$$$G$9$,!"B?J,2~A1$5$l$^$;$s!#(B
  </div>

    
</html>
