Returns an array of specified type, dimensions, and initialization. It provides the ability tocreate an array dynamically whose characteristics are not known until run time.
Complex If nonzero, sets the type of the result to complex single-precision floating-point.
Dcomplex If nonzero, sets the type of the result to complex double-precision floating-point.
Dimension A vector of 1 to 8 elements specifying the dimensions of the result.
Double If nonzero, sets the type of the result to double-precision floating-point.
Float If nonzero, sets the type of the result to single-precision floating-point.
Index The resulting array is initializ33393ed with each element set to the value of its one-dimensional index.
Int If nonzero, sets the type of the result to integer.
Long If nonzero, sets the type of the result to longword integer.
Nozero If nonzero, the resulting array is not initialized.
Size A longword vector specifying the type and dimensions of the result. It consists of the following elements:
Type Sets the type of the result to be the type code entered
Type Code | Data Type |
---|---|
1 | Byte |
2 | Integer |
3 | Longword integer |
4 | Single-precision floating-point |
5 | Double-precision floating-point |
6 | Complex single-precision |
7 | String |
12 | Complex double-precision |
NOTE: The resulting type cannot be specified if Value is a structure.
a = MAKE_ARRAY(Size = [2, 4, 3, 3, 12], $ Value = 5)
a
is determined by the Size keyword.
INFO, a
VARIABLE LONG = Array(4, 3)
PRINT, a
5 5 5 5
5 5 5 5
5 5 5 5
b = MAKE_ARRAY(4, 3, Type = 3, Value = 5)
b
is determined by the Type keyword.
INFO, b
VARIABLE LONG = Array(4, 3)
PRINT, b
5 5 5 5
5 5 5 5
5 5 5 5
c
is determined by the Value keyword.
c = MAKE_ARRAY(4, 3, Value = 5L) INFO, c
VARIABLE LONG = Array(4, 3)
PRINT, c
5 5 5 5
5 5 5 5
5 5 5 5