CMatrix:GetRow
The GetRow method returns a reference to the CArray at the specified row.
nRow = CMatrix:GetRow( nIndex ) where |
nIndex is the row index of the member to retrieve.
nRow is a reference to the CArray at row index nIndex. On failure, nil is returned.
Each row of the CMatrix is a reference to a CArray containing (column, value) pairs. This method returns a reference to the row object at index nIndex.
Assume that a CMatrix named M exists and contains a value "abc" at index [10][5]. This script shows working with the returned row as a CArray:
|
-- return a reference to row 10 |
|
-- check that row r exists and column 5 exists |
|
-- get the value of M[10][5] |
|
-- v = 'abc' |
|
|