- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
for the type pointer code:
type ClusterNode
integer :: nes ! number of elements
type(IndexInCGNS),allocatable :: idxscg(:) ! indexes corresponding to cgns file (nes)
type(ClusterNode),pointer :: son1=>null() ! if HaveSons, allocate
type(ClusterNode),pointer :: son2=>null()
type(v3d) :: alpha, beta ! minimum
end type ClusterNode
1. when I use gfortran to compile, I got the error:
type(ClusterNode),pointer :: son1=>null() ! if HaveSons, allocate
1
Error: Cannot change attributes of USE-associated symbol null at (1)
2. when i use ifort to compile, I got the error:
This array or function or substring is invalid in constant expressions. [NULL]
type(ClusterNode),pointer :: son1=>null() ! if HaveSons, allocate
----------------------------------------^
3. when I use g95 to compile, it passed.
Could anyone tell me why?
type ClusterNode
integer :: nes ! number of elements
type(IndexInCGNS),allocatable :: idxscg(:) ! indexes corresponding to cgns file (nes)
type(ClusterNode),pointer :: son1=>null() ! if HaveSons, allocate
type(ClusterNode),pointer :: son2=>null()
type(v3d) :: alpha, beta ! minimum
end type ClusterNode
1. when I use gfortran to compile, I got the error:
type(ClusterNode),pointer :: son1=>null() ! if HaveSons, allocate
Error: Cannot change attributes of USE-associated symbol null at (1)
2. when i use ifort to compile, I got the error:
This array or function or substring is invalid in constant expressions. [NULL]
type(ClusterNode),pointer :: son1=>null() ! if HaveSons, allocate
----------------------------------------^
3. when I use g95 to compile, it passed.
Could anyone tell me why?
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
there is not enough context to tell you anything. You did not say what versions of gfortran, ifort, and g95 you use,
and the code fragment is incomplete as the types v3d IntexInCGNS are not defined.
We need more information and code that can be compiled. I have a link below that explains how to upload a file.
ron
and the code fragment is incomplete as the types v3d IntexInCGNS are not defined.
We need more information and code that can be compiled. I have a link below that explains how to upload a file.
ron
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page