CMatrix:Exists
The Exists method returns true if a CMatrix member exists with the specified indices.
bSuccess = CMatrix:Exists( row, col ) |
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 fragment 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 |