Next: Array Constructors
Up: Arrays
Previous: Array Bound Violations
These are often useful in procedures, consider the
declaration:
REAL, DIMENSION(-10:10,23,14:28) :: A
- LBOUND(SOURCE[,DIM]) -- lower bounds of an array (or
bound in an optionally specified dimension).
- LBOUND(A) is (/-10,1,14/) (array);
- LBOUND(A,1) is -10 (scalar).
- UBOUND(SOURCE[,DIM]) -- upper bounds of an array (or
bound in an optionally specified dimension).
- SHAPE(SOURCE) -- shape of an array,
- SHAPE(A) is (/21,23,15/) (array);
- SHAPE((/4/)) is (/1/) (array).
- SIZE(SOURCE[,DIM]) -- total number of array elements
(in an optionally specified dimension),
- SIZE(A,1) is 21;
- SIZE(A) is 7245.
- ALLOCATED(SOURCE) -- array allocation status;
For more information, click here
Now try this question
Next: Array Constructors
Up: Arrays
Previous: Array Bound Violations
©University of Liverpool, 1997
Wed May 28 23:37:18 BST 1997Not for commercial use.