Gambas Documentation - /comp/gb.data/list

# List (gb.data)

This class implements a circular doubly-linked list, i.e. you have Variants linked together and can traverse them in either direction (thus doubly-linked). The next ancestor of the last element in the list will be the first and vice versa (thus circular).

Linked lists trash the CPU data cache when they are traversed. On the other hand, they can cope with less total memory movements than Arrays do. You have to decide when each class is called for. If unsure, choose an Array. It is always faster anyway :-)

This class is
Dim hList As List
creatable
.
This class acts like a
Dim hList As List Dim aVariant As Variant
read
/
Dim hList As List Dim aVariant As Variant
write
array.
This class is
Dim hList As List Dim aVariant As Variant
enumerable
with the FOR EACH keyword.

Properties | Methods
--- | ---

Return or set whether the Index property is automatically converted to a normalised index.
AutoNormalize
property Read Backwards As comp/gb.data.List.Backwards
Backwards
property Read Count As Integer
Count
Return a virtual object representing the current element.
Current
A shortcut to Current.Index.
Index
A shortcut to Current.Value.
Value

Sub Append ( Value As Variant )
Append
Sub Clear ( )
Clear
Function FindFirst ( Value As Variant ) As Integer
FindFirst
Function FindLast ( Value As Variant ) As Integer
FindLast
Function FindNext ( Value As Variant ) As Integer
FindNext
Function FindPrev ( Value As Variant ) As Integer
FindPrev
Function FindPrevious ( Value As Variant ) As Integer
FindPrevious
Sub MoveFirst ( )
MoveFirst
Sub MoveLast ( )
MoveLast
Sub MoveNext ( )
MoveNext
Sub MovePrev ( )
MovePrev
Sub MovePrevious ( )
MovePrevious
Sub MoveTo ( Index As Integer )
MoveTo
Sub Prepend ( Value As Variant )
Prepend
Function Take ( [ Index As Integer ] ) As Variant
Take