CountList()
Syntax
Result = CountList(linkedlist())Description
Counts how many elements there are in the linked list. It does not change the current element. This command is very fast (it doesn't iterates all the list but uses a cached result) and can be safely used to determine if a list is empty or not.
Parameter:
linkedlist() - The name of your linked list variable, created with the NewList command. You must specify the brackets after the list name.
Return value:
The total number of elements in the linked list.
Example:NewList countme.w() ; Small loop to add some elements to the list. For i=0 To 10 AddElement(countme()) countme() = i * 23 Next ; Show how many elements there are in the list. I hope you thought ; of the same value as this example ;) MessageRequester("Information", "There are "+Str(CountList(countme()))+" elements in the list", #PB_MessageRequester_OK)
Supported OS
All