XSLPsetfunctionerror
| XSLPsetfunctionerror | 
  Purpose
 
 Set the function error flag for the problem
 
  Synopsis
 
int XPRS_CC XSLPsetfunctionerror(XSLPprob Prob);
 
  Argument
 
| 
     Prob 
     | 
     The current SLP problem.
     | 
  Example
 
 The following example from within a user function sets the function error flag if there is an error during the function evaluation:
 
double XPRS_CC ProfitCalc(double *Value, int *ArgInfo) {
  XSLPprob Prob;
  double Factor, Size;
  Factor = Value[0];
  Size = Value[1];
  if (Factor < 0) {
    XSLPgetfuncobject(ArgInfo, XSLP_XSLPPROBLEM, &Prob);
    XSLPsetfunctionerror(Prob);
    return 0.0;
  }
  return pow(Factor,Size);
}
 Note the use of
 XSLPgetfuncobject to retrieve the Xpress NonLinear problem.
 
  Further information
 
 Once the function error has been set, calculations generally stop and the routines will return to their caller with a nonzero return code.
 
 
