There is this C code:
*(*(A+i)+j) = aaa(*bbb,0,PI)/(16*PI);
aaa is a function, and bbb is another function:
double bbb(double x, double y)
{
int i,j,k,l,m,n;
*(K+1)=sin(x)*cos(y);
*(K+2)=sin(x)*sin(y);
*(K+3)=cos(x);
...
...
My question is, when bbb is called inside the function aaa, there isn't any parentheses following bbb, that is, no variable is passed into function bbb. So what are the values of x and y in the function bbb? Both zero?
Alright, this is part of a really long code:
*(*(A+i)+j) = aaa(*bbb,0,PI)/(16*PI);
aaa and related functions:
double aaa(double (*func)(double, double), double x1, double x2)
{
double qgaus(double (*func)(double), double a, double b);
double f1(double x);
nrfunc=func;
return qgaus(f1,x1,x2);
}
double f1(double x)
{
double qgaus(double (*func)(double), double a, double b);
double f2(double y);
double yy1(double),yy2(double);
xsav=x;
return qgaus(f2,yy1(x),yy2(x));
}
double f2(double y)
{
return (*nrfunc)(xsav,y);
The capital variable K in function bbb is a global variable defined in main().
I just want to know what are the x and y values passed into function bbb.