Routines (alphabetical) > Routines: P > PTRARR

# PTRARR

The PTRARR function returns a pointer vector or array. The individual elements of the array are set to the Null Pointer.

## Example

Create P, a 3 element by 3 element pointer array with each element containing the Null Pointer by entering:

P = PTRARR(3, 3)

## Syntax

Result = PTRARR( D1, ... …, D8 [, /ALLOCATE_HEAP ] )

## Return Value

Returns a vector or array of the specified dimensions.

## 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

### ALLOCATE_HEAP

Normally, PTRARR sets every element of the result to the null pointer. It you wish IDL to allocate heap variables for every element of the array instead, set the ALLOCATE_HEAP keyword. In this case, every element of the array will be initialized to point at an undefined heap variable.

## Version History

5.0 | Introduced
8.0 | Obsolete NOZERO keyword

## See Also

PTR_FREE, PTR_NEW, PTR_VALID