 user-supplied subroutine which
calculates the functions. In FORTRAN, <I>fcn</I> must be declared
in an external statement in the user calling
program, and should be written as follows:
<P>
<PRE>
  subroutine fcn(m,n,x,fvec,iflag)
  integer m,n,iflag
  double precision x(n),fvec(m)
  ----------
  calculate the functions at x and
  return this vector in fvec.
  ----------
  return
  end
</PRE>

<P>
In C, <I>fcn</I> should be written as follows:
<P>
<PRE>
  void fcn(int m, int n, double *x, double *fvec, int 