|
CMatrix:Remove
The Remove method removes the CMatrix
member at row n, column m.
Syntax
|
value = CMatrix:Remove( n, m )
|
n is the row index of the member to be removed.
m is the column index of the member to remove.
On success,
the value of the removed member is
returned.
Otherwise,
nil is returned.
Remarks
This method removes the member at row n, column m.
If removing the element leaves a row with zero columns, then the
empty row is also removed.
The type of the returned value corresponds to
whatever type was saved into the CMatrix at the specified
index. This may be a number, string, or other quantity.
Example
The following script removes the member at index
[10][8]:
|
M = new_matrix()
|
|
|
M:Set( 5, 4, "s1" )
|
|
|
M:Set( 12, 40, "s2" )
|
|
|
M:Set( 20, 18, "s3" )
|
|
|
M:Set( 10, 120, "s4" )
|
|
|
Printf("N = %d", M:Members())
|
|
|
v = M:Remove( 12,
40 )
|
|
|
Printf("N= %d,
v='%s'",M:Members(),v)
|
|
Related Topics
CMatrix class
RemoveRow
Members
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.
|