J3/99-146r3
Date: 27th May 1999
To: J3
From: Malcolm Cohen
Subject: Unresolved issue 9
1. Introduction
In issue 9 Richard Maine makes 2 suggestions:
(1) allowing initialisation of objects containing allocatable components
(at least to NULL()) and
(2) allowing PARAMETERs of these types.
I concur.
Since this makes
TYPE T2
REAL,ALLOCATABLE :: X
INTEGER ANSWER
END TYPE
TYPE(T2) :: V = T(NULL(),42)
legal, perhaps
TYPE T
REAL,ALLOCATABLE :: X => NULL()
END TYPE
should be legal also (for consistency)? On the other hand, this adds no
functionality at all and is an entirely redundant initialization, so I
propose
NOT adding it. If it is required, edits are required to [43:30-34] at
least.
2. A related issue
This was just unresolved issue 10, so it is already in the document.
3. Edits
Comments on each edit appear in {}.
{Allow intrinsic structure constructors for things with alloc comps to be
used in DATA etc.}
[62:37-39] Delete.
{Alter constraint to allow parameters of d.t.s with alloc comps}
[70:32-33] Delete "a derived-type ... allocatable,"
{Alter constraint to allow d.t.s with alloc comps to be initialised}
[71:18-19] Delete "a derived-type ... allocatable,"
{Delete J3 note}
[71:21-41] Delete.
{Allow d.t.s with alloc comps to be init'ed in DATA}
[93:43-44] Delete.
{Require structure constructors for such things to have NULL() for the alloc
comps}
[94:31-32] Change "each component shall be an initialization expression" to
"it shall be an initialization expression".
{Allow NULL() for allocatable components in structure constructors to be
considered to be "constant" expressions. Also fix infelicity -
constructors
have s, not components.}
[141:37-38] Change "each component ... attribute" to
"each corresponding to an allocatable component
is
a reference to the transformational intrinsic function NULL and
each other is a constant expression".
{The same for initialization expressions.}
[143:1-2] Change "each component ... attribute" to
"each corresponding to an allocatable component
is
a reference to the transformational intrinsic function NULL and
each other is an initialization expression".