
}
</pre>
</div>

<p>
The easiest way to handle these situations is to use the <tt>typemaps.i</tt> file.  For example:
</p>

<div class="code">
<pre>
%module example
%include "typemaps.i"

void add(int, int, int *OUTPUT);
int  sub(int *INPUT, int *INPUT);
</pre>
</div>

<p>
In Tcl, this allows you to pass simple values instead of pointer.  For example:
</p>

<div class="code">
<pre>
set a [add 3 4]
puts $a
7
</pre>
</div>

<p>
Notice how the <tt>INPUT</tt> parameters allow integer values to be passed instea