B
Bigdakine
I don't know if this is the right forum for this, and if not please suggest one
which fits.
I have to call a fortran sub routine from a C main program.
The fortran subroutine statement is
wload(starttime, duration, station, component, dataray, nsamp, calib, srate,
samplength, datadir)
And the variables are defined
real*8 starttime
real duration
character*(*) sta
character*(*) component
integer*4 dataray(1)
integer nsamp,samplength
real calib,srate
character*100 datadir
Of these, starttime, duration, station, component are inputs. dataray is an
integer vector created in the C-program via dataray = calloc(65000,
sizeof(int))
In the C-code I have the following variable defs..
double starttime
char sta[5], component[4]
char *datadir
float duration, calib, srate
But I can't get the call to the fortran sub to work with robustness. Do you
have any pointers as to how the c-variables should be defined and a function
prototype for wload_ that could accomplish that?
If you know of a good FAQ on this, that would work for me too...
Yours,
Stuart
Dr. Stuart A. Weinstein
Ewa Beach Institute of Tectonics
"To err is human, but to really foul things up requires a creationist"
"Creationists aren't impervious to Logic: They're oblivious to it."
which fits.
I have to call a fortran sub routine from a C main program.
The fortran subroutine statement is
wload(starttime, duration, station, component, dataray, nsamp, calib, srate,
samplength, datadir)
And the variables are defined
real*8 starttime
real duration
character*(*) sta
character*(*) component
integer*4 dataray(1)
integer nsamp,samplength
real calib,srate
character*100 datadir
Of these, starttime, duration, station, component are inputs. dataray is an
integer vector created in the C-program via dataray = calloc(65000,
sizeof(int))
In the C-code I have the following variable defs..
double starttime
char sta[5], component[4]
char *datadir
float duration, calib, srate
But I can't get the call to the fortran sub to work with robustness. Do you
have any pointers as to how the c-variables should be defined and a function
prototype for wload_ that could accomplish that?
If you know of a good FAQ on this, that would work for me too...
Yours,
Stuart
Dr. Stuart A. Weinstein
Ewa Beach Institute of Tectonics
"To err is human, but to really foul things up requires a creationist"
"Creationists aren't impervious to Logic: They're oblivious to it."