Platform | x64, Win32, .NET |
Purpose |
To get the shape of an array or a scalar. |
Class |
Inquiry function. |
Syntax |
INTEGER FUNCTION SHAPE(SOURCE) |
Description |
SOURCE is an array or scalar of any type. |
Return value |
The result is a one-dimensional integer array whose size is equal to the rank of SOURCE and whose values represent the shape of SOURCE (the extent of each dimension in turn). |
Example |
If A has dimension (2:5, -2:5) then SHAPE(A) gives (/ 4, 8 /). If B is a scalar then SHAPE(B) has rank one and zero size. |