Xar module

xar_add

procedureSource

Appends el and returns a pointer to the stored copy, or null if a chunk could not be allocated.

Example↗
array: Xar(int, 2, 4);
slot := xar_add(*array, 7);
slot.* += 1;
assert(array[0] == 8);
xar_reset(*array);
xar_add :: (array: *Xar, el: array.Element_Type) -> *array.Element_Type

Parameters

array: *Xar
el: array.Element_Type

Returns

*array.Element_Type

See also