Re: how do you send a fortran character string from GCC to GFortran ?

Liste des GroupesRevenir à cl fortran 
Sujet : Re: how do you send a fortran character string from GCC to GFortran ?
De : ldo (at) *nospam* nz.invalid (Lawrence D'Oliveiro)
Groupes : comp.lang.fortran
Date : 03. Jan 2025, 01:30:39
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vl7b3e$3ikvi$5@dont-email.me>
References : 1
User-Agent : Pan/0.161 (Chasiv Yar; )
On Thu, 2 Jan 2025 02:27:54 -0600, Lynn McGuire wrote:

How do you send a fortran character string from GCC to GFortran ?

Seems like trying to call Fortran routines from C is not quite
straightforward. Looking at the (draft?) Fortran 2023 spec, page 514 says:

    In a reference from C to a Fortran procedure with an interoperable
    interface, a C actual argument shall be the address of a C
    descriptor for the intended effective argument if the
    corresponding dummy argument interoperates with a C formal
    parameter that is a pointer to CFI_cdesc_t.

The following section (page 516 onwards) defines these “C descriptors”. Or
alternatively (back to page 514), you might need to declare your Fortran
routine with the “BIND(C)” attribute.

Date Sujet#  Auteur
2 Jan 25 * how do you send a fortran character string from GCC to GFortran ?10Lynn McGuire
2 Jan 25 +* Re: how do you send a fortran character string from GCC to GFortran ?3Thomas Koenig
2 Jan 25 i+- Re: how do you send a fortran character string from GCC to GFortran ?1Lynn McGuire
10 Jan 25 i`- Re: how do you send a fortran character string from GCC to GFortran ?1Lynn McGuire
2 Jan 25 +* Re: how do you send a fortran character string from GCC to GFortran ?5Steven G. Kargl
2 Jan 25 i`* Re: how do you send a fortran character string from GCC to GFortran ?4Lynn McGuire
3 Jan 25 i +- Re: how do you send a fortran character string from GCC to GFortran ?1Steven G. Kargl
9 Jan 25 i `* Re: how do you send a fortran character string from GCC to GFortran ?2Thomas Jahns
9 Jan 25 i  `- Re: how do you send a fortran character string from GCC to GFortran ?1Thomas Koenig
3 Jan 25 `- Re: how do you send a fortran character string from GCC to GFortran ?1Lawrence D'Oliveiro

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal