Fortran中的结构
示例
该bind属性还可以应用于派生类型:
鹅
struct Goose {
int flock;
float buoyancy;
}
struct Goose goose_c;鹅90
use, intrinsic :: iso_c_binding, only : c_int, c_float type, bind(C) :: goose_t integer(c_int) :: flock real(c_float) :: buoyancy end type goose_t type(goose_t) :: goose_f
现在可以在goose_c和之间传输数据goose_f。Goose可以从Fortran中使用调用带有类型参数的C例程type(goose_t)。
热门推荐
10 爸妈简短婚礼祝福语大全
11 亲人喜得贵子祝福语简短
12 八一祝福语简短文字
13 朋友升迁的祝福语简短
14 病人的生日祝福语简短
15 预祝中秋简短的祝福语
16 高考录取庆贺祝福语简短
17 开丁大吉祝福语 简短
18 小孩生日送花祝福语简短