CArray:Count
The Count method returns the number of members in the CArray object.
number = CArray:Count() |
On success, this method returns the number of members in the array.
On failure, this method returns 0.
This method returns the number of members (or values) in the CArray. This is not the same thing as the maximum index in the array. For example, if the CArray has 2 members, one at index 1 and the other at index 10000, then Count = 2.
Suppose a CArray assigned to A contains 3 members as shown below:
|
-- create a CArray |
|
-- set member 2 |
|
-- set member 50 |
|
-- set member 120 |
|
-- result: N = 3 |
|
-- if finished with A, clean up memory |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.