This website is no longer maintained. Its content may be obsolete. Please visit http://home.cern/ for current CERN information.
These do not exist as such: given
TYPE(entry) :: rows(n)then
rows%next ! illegalwould be such an object, but with an irregular storage pattern. For this reason they are not allowed. However, we can achieve the same effect by defining a derived data type with a pointer as its sole component:
TYPE row REAL, POINTER :: r(:) END TYPEand then defining arrays of this data type:
TYPE(row) :: s(n), t(n)where the storage for the rows can be allocated by, for instance,
DO i = 1, n ALLOCATE (t(i)%r(1:i)) ! Allocate row i of length i END DOThe array assignment
s = tis then equivalent to the pointer assignments
s(i)%r => t(i)%rfor all components.