CArray:Set
The Set method adds or changes the value of the member at a specified CArray index.
CArray:Set( index, value ) |
The following script fragment sets 2 of the CArray members. Other members, such as index 2, remain undefined:
|
-- create a CArray |
|
-- set the member at index 4 |
|
-- set the member at index 1 |
|
-- result: A[4] = 10.5 |
|
-- result: A[2] = 0 |