Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

PRIVATE components of a data type

jond
Novice
737 Views
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
0 Kudos
1 Reply
Steven_L_Intel1
Employee
737 Views
It is allowed in F2003 but this is not yet implemented by Intel Fortran.
0 Kudos
Reply