# IBM Visualization Data Explorer Programmer's Reference

[ Bottom of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]

### DXAllocateArray

Function Allocates space for the data items of an Array.

Syntax

    #include <dx/dx.h>
    Array DXAllocateArray(Array a, int n)

.

Functional Details This routine allocates to Array `a` the space for at least `n` items. It increases efficiency because it allocates space in advance, eliminating the need to allocate additional space at a later time. It is most useful when you can specify the maximum number of items that will be added. The routine changes only the amount of space allocated to Array `a`, not the number of items in it (only `DXAddArrayData` can do that).

Note: In the ideal case of knowing the exact number of items the Array will require, you can call `DXAddArrayData(a, o, n, NULL)`, which will allocate the right amount of space for the specified number of items (`n`). The allocation routine detailed here, on the other hand, is for creating Arrays when this information is not exact.

Return Value Returns `a` or returns `NULL` and sets an error code.

See Also `DXAddArrayData, DXTrim, DXTrimItems,` "Irregular Arrays".

[ Top of Page | Previous Page | Next Page | Table of Contents | Partial Table of Contents | Index ]
[Data Explorer Documentation | QuickStart Guide | User's Guide | User's Reference | Programmer's Reference | Installation and Configuration Guide ]

[Data Explorer Home Page]

[IBM Home Page | Order | Search | Contact IBM | Legal ]