Sophie

Sophie

distrib > Mageia > 3 > i586 > by-pkgid > 7bbcdaba35dce2ca7c74c5b1d6ee4a26 > files > 14

ocaml-extlib-doc-1.5.3-4.mga3.noarch.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="ExtString.html">
<link rel="next" href="IO.html">
<link rel="Up" href="index.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"><title>Global</title>
</head>
<body>
<div class="navbar"><a class="pre" href="ExtString.html" title="ExtString">Previous</a>
&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;<a class="post" href="IO.html" title="IO">Next</a>
</div>
<h1>Module <a href="type_Global.html">Global</a></h1>
<pre><span class="keyword">module</span> Global: <code class="code">sig</code> <a href="Global.html">..</a> <code class="code">end</code></pre><div class="info">
Mutable global variable.
<p>

	Often in OCaml you want to have a global variable, which is mutable 
    and uninitialized when declared. You can use a <code class="code">'a option ref</code> but
	this is not very convenient. The Global module provides functions
	to easily create and manipulate such variables.<br>
</div>
<hr width="100%">
<pre><span id="TYPEt"><span class="keyword">type</span> <code class="type">'a</code> t</span> </pre>
<div class="info">
Abstract type of a global<br>
</div>

<pre><span id="EXCEPTIONGlobal_not_initialized"><span class="keyword">exception</span> Global_not_initialized</span> <span class="keyword">of</span> <code class="type">string</code></pre>
<div class="info">
Raised when a global variable is accessed without first having been
 assigned a value. The parameter contains the name of the global.<br>
</div>
<pre><span id="VALempty"><span class="keyword">val</span> empty</span> : <code class="type">string -> 'a <a href="Global.html#TYPEt">t</a></code></pre><div class="info">
Returns an new named empty global. The name of the global can be any
 string. It identifies the global and makes debugging easier.<br>
</div>
<pre><span id="VALname"><span class="keyword">val</span> name</span> : <code class="type">'a <a href="Global.html#TYPEt">t</a> -> string</code></pre><div class="info">
Retrieve the name of a global.<br>
</div>
<pre><span id="VALset"><span class="keyword">val</span> set</span> : <code class="type">'a <a href="Global.html#TYPEt">t</a> -> 'a -> unit</code></pre><div class="info">
Set the global value contents.<br>
</div>
<pre><span id="VALget"><span class="keyword">val</span> get</span> : <code class="type">'a <a href="Global.html#TYPEt">t</a> -> 'a</code></pre><div class="info">
Get the global value contents - raise Global_not_initialized if not
 defined.<br>
</div>
<pre><span id="VALundef"><span class="keyword">val</span> undef</span> : <code class="type">'a <a href="Global.html#TYPEt">t</a> -> unit</code></pre><div class="info">
Reset the global value contents to undefined.<br>
</div>
<pre><span id="VALisdef"><span class="keyword">val</span> isdef</span> : <code class="type">'a <a href="Global.html#TYPEt">t</a> -> bool</code></pre><div class="info">
Return <code class="code">true</code> if the global value has been set.<br>
</div>
<pre><span id="VALopt"><span class="keyword">val</span> opt</span> : <code class="type">'a <a href="Global.html#TYPEt">t</a> -> 'a option</code></pre><div class="info">
Return <code class="code">None</code> if the global is undefined, else <code class="code">Some v</code> where v is the
  current global value contents.<br>
</div>
</body></html>