example
int fact(int n);
</pre></div>

<p>
creates a built-in function <tt>fact</tt> that works exactly
like you think it does:
</p>

<div class="code"><pre>
% load ./example.so
% fact 4
24
% set x [fact 6]
%
</pre></div>

<H3><a name="Tcl_nn17">37.3.3 Global variables</a></H3>


<p>
C/C++ global variables are wrapped by Tcl global variables.  For example:
</p>

<div class="code"><pre>
// SWIG interface file with global variables
%module example
...
%inline %{
extern double density;
%}
...
</pre></div>

<p>