- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have parent derived-type TypeA and a child derived-type TypeB that extends TypeA:
type TypeA
...
end type TypeA
type,extends(TypeA) :: TypeB
...
end type TypeB
I would like to have the inner components of TypeB to be PRIVATE. I add the PRIVATE attribute to TypeB the usual way:
type,extends(TypeA) :: TypeB
PRIVATE
...
end type TypeB
This gives me the following error:
error #6817: The PRIVATE statement is incorrectly positioned within the derived-type definition.
Is this not allowed in Fortran 2003 or is there a different syntax? Thanks for any help.
Jon
type TypeA
...
end type TypeA
type,extends(TypeA) :: TypeB
...
end type TypeB
I would like to have the inner components of TypeB to be PRIVATE. I add the PRIVATE attribute to TypeB the usual way:
type,extends(TypeA) :: TypeB
PRIVATE
...
end type TypeB
This gives me the following error:
error #6817: The PRIVATE statement is incorrectly positioned within the derived-type definition.
Is this not allowed in Fortran 2003 or is there a different syntax? Thanks for any help.
Jon
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is allowed in F2003 but this is not yet implemented by Intel Fortran.
![](/skins/images/98E68944C1FF703B8AC50091329B92AF/responsive_peak/images/icon_anonymous_message.png)
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