inquire size of allocated array

Hi!

Is there a function returning the sizes of the respective dimensions of an allocated array? If not , then I’ll be forced to pass them explicitly using variables of the following, more complicated type:

TYPE GridType
INTEGER :: NX, NY
REAL(R4KIND), ALLOCATABLE, DIMENSION(:,:) :: Values
END TYPE GridType

Thanks!

Arjan
E-mail: Arjan.van.Dijk@RIVM.nl

Hi Arjan,

The SIZE intrinsic returns the size of an array. Please refer to page 242 of the PGI Fortran Reference Guide for details.

  • Mat

Thanks Mat,

I know this was an RTFM, but the number of possibilities is so vast, that I hadn’t found it.

Regards,

Arjan