Fortran Coder

标题: 语法求助An allocate/deallocate object must have the ALLOCATABLE or POINTE... [打印本页]

作者: xmcm    时间: 2015-4-25 18:21
标题: 语法求助An allocate/deallocate object must have the ALLOCATABLE or POINTE...
编译错误
1 An allocate/deallocate object must have the ALLOCATABLE or POINTER attribute.   [E]
2  An ALLOCATE shape must not be given for a scalar object.   [E]


对应代码为:
ALLOCATE(open_0(max_elem),open_old(max_elem),open_new(max_elem),press_new(max_elem),aw(max_elem),ac(max_elem),e(max_elem),x(max_elem),f(max_elem),A(max_elem,max_elem),C(max_elem,max_elem),STAT=error)


作者: 楚香饭    时间: 2015-4-25 21:48
你的 E 没有定义成可分配数组,或者没有给出维度。检查对 E 的定义
作者: xmcm    时间: 2015-4-26 08:29
楚香饭 发表于 2015-4-25 21:48
你的 E 没有定义成可分配数组,或者没有给出维度。检查对 E 的定义

非常感谢,已解决~~




欢迎光临 Fortran Coder (http://bbs.fcode.cn/) Powered by Discuz! X3.2