Tutorial by Examples

Fortran 2003 introduced language features which can guarantee interoperability between C and Fortran (and to more languages by using C as an intermediary). These features are mostly accessed through the intrinsic module iso_c_binding: use, intrinsic :: iso_c_binding The intrinsic keyword here en...
The bind attribute can also be applied to derived types: geese.h struct Goose { int flock; float buoyancy; } struct Goose goose_c; geese.f90 use, intrinsic :: iso_c_binding, only : c_int, c_float type, bind(C) :: goose_t integer(c_int) :: flock real(c_float) :: buoyancy e...

Page 1 of 1