Surely this is a question of style rather than program meaning? I
believe the following declarations are equivalent:
REAL(DP), DIMENSION(:,:), ALLOCATABLE :: X
REAL(DP), ALLOCATABLE, DIMENSION(:,:) :: X
REAL(DP) :: X
ALLOCATABLE :: X(:,:)
David.
Guylaine Prat wrote:
>
> Jens Bredenbeck wrote:
>
> > !The arrays are declared:
> > REAL(DP), ALLOCATABLE, DIMENSION(:, :) :: c_coord, n_coord, o_coord
>
> It will not help, but I have another question:
> in a book, I have read that the above declaration is the best way to declare such arrays:
> i.e. to put "allocatable" before "dimension", but I found no explanations about it.
> By the way it was the only book I read that said such a thing.
>
> So by browsing the archive of the mailing list I found the two kind of writing, such as:
>
> REAL(DP), ALLOCATABLE, DIMENSION(:, :) :: xxxx
> or
> REAL(DP), DIMENSION(:, :) , allocatable :: xxxx
>
> So it seems not clear to me. Somebody has a clue ? or a recommendation ?
> Thanks
> Guylaine Prat
|