Actually, this is what I have:

in C

double complex a, b, z
int lnchf ip
out = conhyp_ (&a, &b, &z, &lnchf, &ip) ;

In Fortran:
      FUNCTION CONHYP (A,B,Z,LNCHF,IP)

      INTEGER LNCHF,IP
      COMPLEX*16 CHGF,A,B,Z,CONHYP

And what I get is
A= b, B=z (the other values are wrong)
It means that the first variable (here a) is just lost
How can I fix this?


>
> > in c, I use double complex
> > in f95, I use COMPLEX*16
>
> Never heard of double complex in c.
>
> Fortran passes all arguments by reference, so a fortran
> routine that has a complex*16 arg probably needs something
> like this in C
>
> struct c16 {
>    double real;
>    double imag;
> };
>
> fortran_routine(struct c16* arg);
>
> That would be my guess, anyway.
> _______________________________________________
> users mailing list -- users@lists.fedoraproject.org
> To unsubscribe send an email to users-le...@lists.fedoraproject.org
> Fedora Code of Conduct: 
> https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: 
> https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
>
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org

Reply via email to