loveboyzmj 发表于 2015-9-11 09:22:52

结构体指针错误?

大家好!
我的原始定义段:

      type node      
                real(8) :: InletCoor(2)      
                real(8) :: ExitCoor(2)
                integer :: BlockNo(2)      
                type(node),pointer :: afore
                type(node),pointer :: next
      end type node
      type(node),pointer :: p,q      
p.blockno=Injector!执行代码:
错误提示:
         p.blockno=Injector         1
Error: Unclassifiable statement at (1)
为啥出错呢?   我已经定义了啊
请版主、高人指教啊,初学fortran,摸索中。。。。。




楚香饭 发表于 2015-9-11 14:13:29

p%blockno=Injector

小数点是不标准的用法,可能你的编译器不允许。

loveboyzmj 发表于 2015-9-14 09:35:45

非常感谢,调试没问题了!
页: [1]
查看完整版本: 结构体指针错误?