INDGEN
Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also
The INDGEN function returns an integer array with the specified dimensions.
Syntax
Result = INDGEN(D1 [, ..., D8] [, /BYTE | , /COMPLEX | , /DCOMPLEX | , /DOUBLE | , /FLOAT | , /L64 | , /LONG | , /STRING | , /UINT | , /UL64 | , /ULONG] [, TYPE=value] )
Return Value
Each element of the returned integer array is set to the value of its one-dimensional subscript.
Arguments
Di
Either an array or a series of scalar expressions specifying the dimensions of the result. If a single argument is specified, it can be either a scalar expression or an array of up to eight elements. If multiple arguments are specified, they must all be scalar expressions. Up to eight dimensions can be specified. If the dimension arguments are not integer values, IDL will convert them to integer values before creating the new array.
Keywords
BYTE
Set this keyword to create a byte array.
COMPLEX
Set this keyword to create a complex, single-precision, floating-point array.
DCOMPLEX
Set this keyword to create a complex, double-precision, floating-point array.
DOUBLE
Set this keyword to create a double-precision, floating-point array.
FLOAT
Set this keyword to create a single-precision, floating-point array.
L64
Set this keyword to create a 64-bit integer array.
LONG
Set this keyword to create a longword integer array.
STRING
Set this keyword to create a string array.
TYPE
The type code to set the type of the result. See the description of the SIZE function for a list of IDL type codes.
UINT
Set this keyword to create an unsigned integer array.
UL64
Set this keyword to create an unsigned 64-bit integer array.
ULONG
Set this keyword to create an unsigned longword integer array.
Thread Pool Keywords
This routine is written to make use of IDL's thread pool, which can increase execution speed on systems with multiple CPUs. The values stored in the !CPU system variable control whether IDL uses the thread pool for a given computation. In addition, you can use the thread pool keywords TPOOL_MAX_ELTS, TPOOL_MIN_ELTS, and TPOOL_NOTHREAD to override the defaults established by !CPU for a single invocation of this routine. See Thread Pool Keywords for details.
Examples
Create I, a 5-element vector of integer values with each element set to the value of its subscript by entering:
Version History
See Also
BINDGEN, CINDGEN, DCINDGEN, DINDGEN, FINDGEN, LINDGEN, SINDGEN, UINDGEN, UL64INDGEN, ULINDGEN