CMatrix:Get
The Get method returns the value of the CMatrix member at a specified index.
value = CMatrix:Get( nRow, nCol ) where |
nRow is the row index of the member to retrieve.
nCol is the column index of the member to retrieve.
value is the value of the member and may be a number, string, or other Lua value that can be converted to a number. On failure, nil is returned.
The returned value is whatever type was stored in the matrix at the specified index. If the index is not a valid row and column, this method returns nil.
Assume that a CMatrix named M exists and contains a value "abc" at index [10][5]. This script returns the string:
|
-- get the value of M[10][5] |
|
-- v = 'abc' |