EXTENDS clause
Standard: F77 F90 F95 F2003
  Example Program
<Syntax>
TYPE, EXTENDS(p-name) [ , access ] :: t-name
    ...
END TYPE [ t-name ]

access ::= PRIVATE  | PUBLIC

The p-name in EXTENDS shall be the name of an extensible type; that is, a type that does not have SEQUENCE or BIND(C).
<Semantics>
A type definition with the EXTENDS clause creates a new type by extending a pre-existing one. The extension type t-name has all the components of the parent type p-name; additional components may be declared, these must have different names from the inherited components and type-bound procedures. There is a special parent component of type p-name; this is associated with the inherited components and can be used to manipulate and access them as a group.

The extension type has all the generic type-bound procedures of the parent type, and may declare additional generics.

The extension type has all the specific type-bound procedures of the parent type, except that it may override them. A specific type-bound procedure is overridden simply by declaring a new type-bound procedure with the same name. The overriding procedure must have exactly the same characteristics as the overridden one, except that any passed-object dummy argument shall be CLASS(t-name) instead of CLASS(p-name).
<Related>
CLASS specifier, Derived Type definition, TYPE statement