Modify part of an array¶
ss_array_put
is a function defined in ssarray.c.
Synopsis:
-
herr_t
ss_array_put
(ss_array_t *array, hid_t mtype, size_t offset, size_t nelmts, const void *value)¶
Formal Arguments:
array
: The array whose value will be modified.mtype
: The datatype of the values pointed to byvalue
. If the array contains persistent object links then passss_pers_tm
(or preferably negative).offset
: The array element number at which to putvalue
.nelmts
: The number of array elements invalue
. If this is the constantSS_NOSIZE
then we assume thatvalue
contains enough data to fill up the current size of the array beginning at the specifiedoffset
.value
: The value to be written into the array.
Description: nelmts
values beginning at array element offset
are modified by setting them to value
.
Return Value: Returns non-negative on success; negative on failure.
Parallel Notes: Independent
Issues: there really isn’t any point in actually converting the existing values to memory format and initializing the array’s mbuf if we’re about to overwrite the whole thing anyway.
See Also:
- Variable Length Arrays: Introduction for current chapter