- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Under CVF6.6B
This works:
type symbolType
real, pointer:: a(:),b(:)
end type symbolType
type(symbolType):: symbol
real, pointer:: a(:),b(:)
end type symbolType
type(symbolType):: symbol
symbol.a => symData(:,1)
symbol.b => symData(:,2)
But its extension to an array does not:
type symbolType
real, pointer:: a(:),b(:)
real, pointer:: a(:),b(:)
end type symbolType
type(symbolType):: symbol(4)
type(symbolType):: symbol(4)
symbol(:).a(:) => symSetData(:,1,:) !or (:,:,1)
symbol(:).b(:) => symSetData(:,2,:)
Where the intent is the first (:) on the lhs should point to the first onthe rhs etc, Is thereANY way that this can be achieved?
I have tried
type(symbolType),pointer:: symbol(:)
type(symbolType),allocatable:: symbol(:) !followed by allocation
and a number of other variations, But none compile.
Thanks,
Tim
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot have T(:)%component(:) notation anywhereaccording tothe Standard. I can't quoteexact reasons, butI think that 1) itcan lead to ambiguities, 2) in general case, an array/pointer descriptor cannot be always constructed to match the resulting memory layout.
Thus, you have to resort to DO-loops.
Jugoslav

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