NAME

cxVecDup - create a duplicate of a given vector.
#include <cx/DataAccess.h>

void *cxVecDup(void *src, long len, cxPrimType type)
integer cx_prim_byte
integer cx_prim_short
integer cx_prim_long
integer cx_prim_float
integer cx_prim_double

parameter (cx_prim_byte = 0) parameter (cx_prim_short = 1) parameter (cx_prim_long = 2) parameter (cx_prim_float = 3) parameter (cx_prim_double = 4)
integer function cxVecDup(src, len, type) <type> src(len) integer len integer type
src
Data vector to be copied.
len
Number of vector elements.
type
Element type.
cxVecDup is a convenience function that combines cxVecNew and bcopy. A vector of len elements of type type is created in data memory. It is then initialized by copying the contents of src. The number of bytes needed to initialize the new array will always be copied from src. Inconsistent results will be obtained if src is a vector of a different type or length.

See cxDataManAbortOnError for more details on writing portable module code that copes well with limited memory.

cxVecNew, cxDataManAbortOnError



[ Documentation Home ]