9.3.136 SHAPE (SOURCE)

Description:  Returns the shape of an array or scalar argument.  
Class:  Inquiry function; Generic 
Arguments:  SOURCE is a scalar or array (of any data type). It must not be an assumed- size array, a disassociated pointer, or an allocatable array that is not allocated. 
Results:  The result is a rank-one default integer array whose size is equal to the rank of SOURCE. The value of the result is the shape of SOURCE. 


SHAPE (2) has the value of a rank-one array of size zero.

If B is declared as B(2:4, -3:1), then SHAPE (B) has the value (3, 5).

Previous Page Next Page Table of Contents