CMatrix:Exists
The Exists method returns true if a CMatrix member exists with the specified indices.
bSuccess = CMatrix:Exists( nRow, nCol ) where |
nRow, nCol is the index of the member to test.
bSuccess is the returned success code. On success it is true, otherwise false.
If you use Init then the first n x m members are set and this function will return true if tested with an index in range. Otherwise, members are uninitialized if you do not Set them or if you Remove them.
The following script tests whether the matrix member at index [2][2] has been initialized:
|
-- create a CMatrix |
|
-- set member [1][3] |
|
-- set member [2][4] |
|
-- has member [2][2] been set? |
|
|
|
-- result: M[2][2] exists= no |