Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 6fd5939a63d29067c5ab016a476cd3df > files > 49

ocaml-extlib-1.5.1-3mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="OptParse.Opt.html">
<link rel="next" href="OptParse.Formatter.html">
<link rel="Up" href="OptParse.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Base64" rel="Chapter" href="Base64.html">
<link title="BitSet" rel="Chapter" href="BitSet.html">
<link title="Dllist" rel="Chapter" href="Dllist.html">
<link title="DynArray" rel="Chapter" href="DynArray.html">
<link title="Enum" rel="Chapter" href="Enum.html">
<link title="ExtArray" rel="Chapter" href="ExtArray.html">
<link title="ExtHashtbl" rel="Chapter" href="ExtHashtbl.html">
<link title="ExtList" rel="Chapter" href="ExtList.html">
<link title="ExtString" rel="Chapter" href="ExtString.html">
<link title="Global" rel="Chapter" href="Global.html">
<link title="IO" rel="Chapter" href="IO.html">
<link title="OptParse" rel="Chapter" href="OptParse.html">
<link title="Option" rel="Chapter" href="Option.html">
<link title="PMap" rel="Chapter" href="PMap.html">
<link title="RefList" rel="Chapter" href="RefList.html">
<link title="Std" rel="Chapter" href="Std.html">
<link title="UChar" rel="Chapter" href="UChar.html">
<link title="UTF8" rel="Chapter" href="UTF8.html">
<link title="Unzip" rel="Chapter" href="Unzip.html"><link title="Flag options" rel="Section" href="#6_Flagoptions">
<link title="Value options" rel="Section" href="#6_Valueoptions">
<link title="Callback options" rel="Section" href="#6_Callbackoptions">
<link title="Special options" rel="Section" href="#6_Specialoptions">
<title>OptParse.StdOpt</title>
</head>
<body>
<div class="navbar"><a href="OptParse.Opt.html">Previous</a>
&nbsp;<a href="OptParse.html">Up</a>
&nbsp;<a href="OptParse.Formatter.html">Next</a>
</div>
<center><h1>Module <a href="type_OptParse.StdOpt.html">OptParse.StdOpt</a></h1></center>
<br>
<pre><span class="keyword">module</span> StdOpt: <code class="code">sig</code> <a href="OptParse.StdOpt.html">..</a> <code class="code">end</code></pre>This module contains various standard options.<br>
<hr width="100%">
<br>
<a name="6_Flagoptions"></a>
<h6>Flag options</h6><br>
<pre><span class="keyword">val</span> <a name="VALstore_const"></a>store_const : <code class="type">?default:'a -> 'a -> 'a <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">store_const ?default const</code> returns a flag option which
      stores the constant value <code class="code">const</code> when the option is
      encountered on the command line.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALstore_true"></a>store_true : <code class="type">unit -> bool <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">store_true ()</code> returns an option which is set to true when
      it is encountered on the command line. The default value is
      false.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALstore_false"></a>store_false : <code class="type">unit -> bool <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">store_false ()</code> returns an option which is set to false when
      it is encountered on the command line. The default value is
      true.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALcount_option"></a>count_option : <code class="type">?dest:int Pervasives.ref -> ?increment:int -> unit -> int <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
Create a counting option which increments its value each time the
      option is encountered on the command line.<br>
<b>Returns</b> the newly created option.<br>
</div>
<div class="param_info"><code class="code">dest</code> : Reference to the option value. Useful for making
      options like '--quiet' and '--verbose' sharing a single value.</div>
<div class="param_info"><code class="code">increment</code> : Increment to add to the option value each
      time the option is encountered.</div>
<pre><span class="keyword">val</span> <a name="VALincr_option"></a>incr_option : <code class="type">?dest:int Pervasives.ref -> unit -> int <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
Exactly identical to <code class="code">count_option ~dest:dest ~increment:1 ()</code>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALdecr_option"></a>decr_option : <code class="type">?dest:int Pervasives.ref -> unit -> int <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
Exactly identical to <code class="code">count_option ~dest:dest ~increment:(-1) ()</code>.<br>
</div>
<br>
<a name="6_Valueoptions"></a>
<h6>Value options</h6><br>
<pre><span class="keyword">val</span> <a name="VALint_option"></a>int_option : <code class="type">?default:int -> ?metavar:string -> unit -> int <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">int_option ?default ?metavar ()</code> returns an option which takes
      a single integer argument. If <code class="code">~default</code> is given it is the
      default value returned when the option has not been encountered
      on the command line.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfloat_option"></a>float_option : <code class="type">?default:float -> ?metavar:string -> unit -> float <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
See <a href="OptParse.StdOpt.html#VALint_option"><code class="code">OptParse.StdOpt.int_option</code></a>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALstr_option"></a>str_option : <code class="type">?default:string -> ?metavar:string -> unit -> string <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
See <a href="OptParse.StdOpt.html#VALint_option"><code class="code">OptParse.StdOpt.int_option</code></a>.<br>
</div>
<br>
<a name="6_Callbackoptions"></a>
<h6>Callback options</h6><br>
<pre><span class="keyword">val</span> <a name="VALint_callback"></a>int_callback : <code class="type">?metavar:string -> (int -> unit) -> unit <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">int_callback ?metavar f</code> returns an option which takes a single
      integer argument and calls <code class="code">f</code> with that argument when encountered
      on the command line.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALfloat_callback"></a>float_callback : <code class="type">?metavar:string -> (float -> unit) -> unit <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
See <a href="OptParse.StdOpt.html#VALint_callback"><code class="code">OptParse.StdOpt.int_callback</code></a>.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALstr_callback"></a>str_callback : <code class="type">?metavar:string -> (string -> unit) -> unit <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
See <a href="OptParse.StdOpt.html#VALint_callback"><code class="code">OptParse.StdOpt.int_callback</code></a>.<br>
</div>
<br>
<a name="6_Specialoptions"></a>
<h6>Special options</h6><br>
<pre><span class="keyword">val</span> <a name="VALhelp_option"></a>help_option : <code class="type">unit -> 'a <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">help_option ()</code> returns the standard help option which
      displays a usage message and exits the program when encountered
      on the command line.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALversion_option"></a>version_option : <code class="type">(unit -> string) -> 'a <a href="OptParse.Opt.html#TYPEt">OptParse.Opt.t</a></code></pre><div class="info">
<code class="code">version_option f</code> returns the standard version option which
      displays the string returned by <code class="code">f ()</code> (and nothing else) on
      standard output and exits.<br>
</div>
</body></html>