BINDGEN Function

Returns a byte array with the specified dimensions, setting the contents of the result to increasing numbers starting at 0.

enabled.

Usage

    result = BINDGEN(dim1 [, dim2, ... , dimn])

Input Parameters

dimi—The dimensions of the result array. May be any scalar expression. Up to eight dimensions can be specified.

Returned Value

result—An initialized byte array. If the resulting array is treated as a one-dimensional array, then its initialization is given by the following:

    array (i) = BYTE (i MOD 256)

Keywords

None.

Discussion

Each element of the result array is set to the value of its one-dimensional subscript.

Example

; Create a byte array.
a = BINDGEN(4, 2)
INFO, a
; PV-WAVE prints: A          BYTE      = Array(4, 2)
PRINT, a
; PV-WAVE prints: 
; 0    1    2    3
; 4    5    6    7

See Also

BYTARR, BYTE, CINDGEN, DCINDGEN, DINDGEN, FINDGEN, I32INDGEN, INDGEN, LINDGEN, LINSPACE, SINDGEN