Giorgio Pastore wrote:
>
> Are there general guidelines about when it is better to use pointer
> and when allocatable arrays ? Is there any book or document discussing
> pros and cons of such implementation choices ?
One simple rule of thumb: If a pointer will never be associated with any
target other than one created by specifying that pointer in an allocate
statement, you should change the attribute from pointer to allocatable.
This applies to structure components as well, assuming your compiler is
reasonably up to date.
Cheers,
Bill
--
Bill Long [log in to unmask]
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
|