CArray:Init
The Init method sets the first n CArray members to the same value.
CArray:Init( n, value ) |
n is the number of members to define.
value is the target value to assign and may be a number, string, or other value.
This method first empties the CArray and then defines n array members at indices 1 ... n. After Init, MaxIndex and Count both return n.
The following script initializes the first 1000 members to a value of "name":
|
-- create a CArray |
|
-- set members 1 through 1000 |
|
-- result: A[500] = 'name' |
Mira Pro x64 Script User's Guide, v.8.73 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.