|
CMatrix:ColsUsed
The ColsUsed method returns the maximum
number of column members in any row of the CMatrix.
Syntax
|
used = CMatrix:ColsUsed()
|
On success,
this method returns the maximum number of column members in any
row.
On failure,
this method returns 0.
Remarks
This method returns the number of columns defined
in the row having the most number of columns. This is not the same
as the maximum index in any row.
Example
Suppose a CMatrix assigned to M contains 5 members as shown below. There are 2
columns defined in row 50:
|
M = new_matrix()
|
|
|
M:Set( 2, 44, 1805 )
|
|
|
M:Set( 50, 44, -62 )
|
|
|
M:Set( 50, 1, 600.5 )
|
|
|
M:Set( 3, 44, 102 )
|
|
|
M:Set( 120, 44, 25 )
|
|
|
Printf("Used = %d",
M:ColsUsed())
|
|
|
M:delete()
|
|
Related Topics
CMatrix class
Exists
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.
|