pow_ functions in fortran.

Andrew Pinski pinskia@physics.uc.edu
Thu Apr 20 23:18:00 GMT 2006


> 
> Andrew Pinski wrote:
> >> I am trying to compile this code and running into a problem with 
> >> functions pow_ci pow_cl pow_cc pow_zi pow_zl pow_zz .
> >>
> > You should be using a ** b instead of calling functions for Fortran.

> Oh... so does ** work in place of *all* of the above?

Yes because complex ** integer exists in Fortran 90 and above.


> Another thing that I am trying to get a hang of is these underscores 
> appended to symbols.
> 
> gfortran appends one underscore to a symbol, but then some code here 
> seems to expect a leading underscore (_foo instead of foo_) and 
> sometimes it seems to expect double underscores. Is there a known 
> discrepancy between versions of fortran or compiler vendors regarding 
> this underscore behavior?


Yes because linkage between C and Fortran is not defined until
Fortran 2003 and then you have to use the Fortran 2003 modules
and extensions to Fortran 90/95 to get the linkage.

So linkage between compilers was never defined at all.

-- Pinski



More information about the Fortran mailing list