rapper function must do three things :</p>

<ul>
<li>Gather function arguments and make sure they are valid.
<li>Call the C function.
<li>Convert the return value into a form recognized by the scripting language.
</ul>

<p>
As an example, the Tcl wrapper function for the <tt>fact()</tt>
function above example might look like the following : </p>

<div class="code"><pre>
int wrap_fact(ClientData clientData, Tcl_Interp *interp, int argc, char *argv[]) {
  int result;
  int arg0;
  if (argc != 2) {
    interp-