CSet:RemoveFirst


The RemoveFirst method removes the member at the head of the list.

Syntax

member = CSet:RemoveFirst()

bullet.gif    member is a reference to the member that was removed.

bullet.gif    On success, this method returns the removed member.

bullet.gif    On failure, nil is returned.

Remarks

Removing the list member decreases the list length by 1 member.

Example

Suppose a CSet exists with name S and that it contains 10 values. The following script removes the value at the head of the list:

 

Printf("count=%d", S:Count())

-- result: count=10

S:RemoveFirst()

-- remove the first member

Printf("count=%d", S:Count())

-- result: count=9

Related Topics

CSet, RemoveAt, RemoveLast


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.