|
CValueSet:RemoveAt
The RemoveAt method removes from the object
the (key, value) pair at the specified index, beginning at 1. All
members at higher indices are moved down 1 position to fill the
removed location. This also reduces the CValueSet
Count by 1.
Syntax
bool = CValueSet:RemoveAt( nIndex )
Removes the
member at index nIndex. Returns
boolean true on success, otherwise, false.
Example
The following example creates a CValueSet S, adds
members to it, then removes the member at index 2:
|
S = new_valueset()
|
|
|
S:Add( "key 1", 15.5 )
|
|
|
S:Add( "key 2",
-7125.23 )
|
|
|
S:Add( "key 3", 0.923 )
|
|
|
Printf("Value 2= %lg",
S:GetAt(2))
|
|
|
S:RemoveAt(2)
|
|
|
Printf("Value 2= %lg",
S:GetAt(2)
|
|
Related Topics
CValueSet Class
Remove
Empty
SetAt
Mira Pro x64 Script User's Guide, v.8.76 Copyright Ⓒ 2024
Mirametrics, Inc. All Rights Reserved.
|