CValueSet:GetAt
The GetAt method returns both the string key and value at a specified index in the CValueSet.
strKey, Value = CValueSet:GetAt( nIndex ) Where nIndex is an integer in the CValueSet, ranging from 1 to CValueSet:Count. If the index is invalid, nil, nil is returned. The strKey is the string key at the specified set index. The Value is the set value at the specified index as a number, integer, string, or boolean. On failure, nil, nil is returned. Note that this method returns 2 results. |
The following example creates a CValueSet S and adds members to it, then returns the value at the specified index:
|
-- constructor for a set of type "integer" |
|
-- add a key and value |
|
-- add a key and value |
|
-- add a key and value |
|
-- result: Result= key_2, -7125 |
CValueSet class, Get, GetKeyAt, GetValueAt
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2024 Mirametrics,
Inc. All Rights Reserved.