VC 函数原型:
int Fit(char  *keyword,  double Abest[], double &q, int &kk, double &Sse0,double &Rsqrt,double *Xvector,double *Yvector, int nVector,double *W, int nMju, int nGNtimes, double GNer)
其中 *Xvector,*Yvector 是开辟的一片double型内存空间,大小为nVector*sizeof(double)(nVector 为int型变量)。
   Double Abest[5]:返回值之一,是一维的double型数组,大小为5。
目前我程序中声明的函数及赋值如下:
function Fit(var keyword: pchar; var Abest: array of double;
      var q: Pdouble; var kk: Pinteger; var Sse0, Rsqrt: Pdouble; Xvector:pdouble;
      Yvector:pdouble; nVector: Cardinal; W:pdouble; nMju,
      nGNtimes: Cardinal; GNer: Double): Integer;
其中
  Xvector,yvector: pDouble;
  GetMem(Xvector, sizeof(Double) * nVector);
  GetMem(yvector, sizeof(Double) * nVector);
  传值时传入的是Xvector,Yvector的首地址。
其他的 double型赋值操作为
    a := 0.5;
    b := @a ; (b为pdouble型)现在调用时总提示无效的浮点数操作。不知为何?比较急,先送100分,得到正确答案后再有200分送上,谢谢!