初学gauss, 这个是reference里的例子:
sqpSolveSet;
proc fct(x);
retp( (x[1] + 3*x[2] + x[3])^2 + 4*(x[1] - x[2])^2 );
endp;
proc ineqp(x);
retp(6*x[2] + 4*x[3] - x[1]^3 - 3);
endp;
proc eqp(x);
retp(1-sumc(x));
endp;
start = { .1, .7, .2 };
_sqp_IneqProc = &ineqp;
_sqp_EqProc = &eqp;
{ x,f,lagr,ret } = sqpSolve( &fct,start );
运行时显示 “f” 为illegal redefined. 估计是之前的某个proc中定义过f,但是该怎么初始化呢?求指教.