派生数据类型指针?

时间:2012-06-27 19:36:24

标签: pointers types fortran

我正在尝试将一些C代码转换为Fortran 90.在Fortran中有没有办法定义一个派生数据类型,它是一个指针?下面的代码就是我所说的一个例子。

typedef struct _rkmatrix rkmatrix;
typedef rkmatrix *prkmatrix;

结构_rkmatrix是在这段代码之外定义的。

1 个答案:

答案 0 :(得分:4)

链接列表的示例声明:

type MyCustom_type
   real :: value
   type (MyCustom_type), pointer :: next => null ()
end type MyCustom_type

type (MyCustom_type), pointer :: Head_of_List
相关问题