Array:set(value)method

Sets value stored at the given Array position.

Parameters

value

The last parameter is the value to be used to set the Array at the given position

Warning

The number of indices must be equal to the Array dimensions.

Return value

This method returns no value.

Example

--! luart-extensions import c -- Creates a 2 dimensions C array with 3 rows of 4 chars local CharArray = c.Array("c", 3, 4) local array = CharArray { { "a", "b", "c", '\0' }, { "d", "e", "f", '\0' }, { "g", "h", "i", '\0' } } array:set(0, 0, 65) print(array:set(0, 0)) -- outputs "A"