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
Dcomplex
Dimension
Double
Float
Index
Int
Long
Nozero
Size
Type
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