# IBM Visualization Data Explorer Programmer's Reference

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

### DXNewConstantArray, DXNewConstantArrayV

Function

Create an Array containing constant data.

Syntax
`
#include <dx/dx.h>
`

ConstantArray DXNewConstantArray (int items, Pointer data, Type t,
Category c, int rank, ...)
ConstantArray DXNewConstantArrayV (int items, Pointer data, Type t,
Category c, int rank, int *shape)

Functional Details

Constant Arrays provide a compact mechanism for representing constant values in Array form. All parameters are required:

- `items` specifies the number of items in the Array.
- `data` should point to a memory location containing the constant value to be stored in the Array.
- `t` specifies the type of the data:

      TYPE_BYTE            TYPE_HYPER        TYPE_SHORT
      TYPE_UBYTE           TYPE_INT          TYPE_USHORT
      TYPE_DOUBLE          TYPE_UINT         TYPE_STRING
      TYPE_FLOAT

- `c` specifies the category of the data: `CATEGORY_REAL` or `CATEGORY_COMPLEX`.
- `rank` specifies the rank of the data.
- `shape` (or the remaining `rank` arguments given in the `DXNewConstantArray` form) specify the shape of the data.

The Array created can be deleted with DXDelete. See 4.2 , "Memory Management".

Return Value

Return the Constant Array or returns `NULL` and sets an error code.

See Also

`DXNewArray, DXNewArrayV`

"Constant 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 ]