[J3] CFI_establish and elem_len for zero-length character strings and empty types/structs

Steve Lionel steve at stevelionel.com
Fri Jul 23 10:07:40 UTC 2021


On Fri, Jul 23, 2021 at 6:02 AM Bader, Reinhold via J3 <
j3 at mailman.j3-fortran.org> wrote:

> Given that for the case of a Fortran string we're talking about a
>
> CHARACTER(len=*)
>
> declaration in the Fortran interface which is non-interoperable anyway,
> permitting all elem_len values that can arise in Fortran would follow the
> principle of least surprise.
>

As of F2018, CHARACTER(LEN=*) is interoperable with a C descriptor. This
can catch the unwary.

Steve

>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20210723/02e43d4c/attachment.htm>


More information about the J3 mailing list