The BYTARR function creates a byte vector or array.

Examples


To create B as a 3 by 3 by 5 byte array where each element is set to a random value, enter:

B = BYTARR(3, 3, 5, /NOZERO)
PRINT, B

Syntax


Result = BYTARR( D1[, ..., D8] [, /NOZERO] )

Return Value


This function returns a byte vector or array.

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.

Keywords


NOZERO

Normally, BYTARR sets every element of the result to zero. If the NOZERO keyword is set, this zeroing is not performed (array elements contain random values) and BYTARR executes faster.

Version History


Original

Introduced

See Also


BOOLARR, COMPLEXARR, DBLARR, FLTARR, INTARR, LON64ARR, LONARR, MAKE_ARRAY, STRARR, UINTARR, ULON64ARR, ULONARR