Returns the extent of an array along a specified dimension or the total number of elements in the array.
Result Type and Attributes
Default integer scalar.
The result equals the extent of ARRAY along dimension DIM; or, if DIM is not specified, it is the total number of array elements in ARRAY.
! A is the array | 1 -4 7 -10 | ! | 2 5 -8 11 | ! | 3 6 9 -12 | RES = SIZE( A ) ! The result is 12 because there are 12 elements in A. RES = SIZE( A, DIM = 1) ! The result is 3 because there are 3 rows in A. RES = SIZE( A, DIM = 2) ! The result is 4 because there are 4 columns in A.