J3/06-115r1 Date: 2006-02-14 To: J3 From: Van Snyder Subject: Allow forward type for allocatable components Reference: Pub-116, 04-226, 04-399 Number: J3-028 Title: Allow forward type for allocatable components Submitted by: J3 Status: For Consideration Basic Functionality: Do not require the type of an allocatable component to be defined before the type containing the allocatable component. Rationale: Recursive types can be related by components having the POINTER attribute, which allows the types of the components to be defined after the type definition in which the components appear. Some recursive types could be related by components having the ALLOCATABLE attribute, except that is presently prohibited. ALLOCATABLE is preferable to POINTER whenever possible. We should make every effort to make ALLOCATABLE as widely usable as possible. Estimated Impact: Easy to implement, improves performance, trivial change in the standard. Estimated at meeting 169 to be at 3 on the JKR scale. Detailed Specification: Do not require the type of an allocatable component to be defined before the type containing the allocatable component. Edits: Introduction [xiii]: Add a list item (Editor chooses where): "Allocatable components of recursive types." In Constraint 438 [50:18-19], replace "the POINTER attribute is not" by "neither the POINTER nor ALLOCATABLE attribute is" and delete "shall be CLASS(*) or" (Constraint 437 requires either the POINTER or ALLOCATABLE attribute for a component declared with the CLASS keyword). In Constraint 439 [50:21], insert "or ALLOCATABLE" after "POINTER". Add a sentence at the end of Note 4.36 [54:1-]: "Linked lists can also be constructed using allocatable components." History: Submitted as Pub-116 04-226 m167 04-399 m170 06-115r1 m175