ClearList()
Syntax
ClearList(List())Description
Clears all the elements in this list and releases their memory. After this call the list is still usable, but the list is empty (i.e. there are no elements in it).
Parameters
List() The name of your list variable, created with the NewList function. You must include the brackets after the list name.
Return value
None.
Example
NewList Numbers.w() ; A small loop to add many items to the list For i=1 To 100 AddElement(Numbers()) Numbers() = i Next ; Proof that items have been added to the list MessageRequester("Information", "There are "+Str(ListSize(Numbers()))+" elements in the list", #PB_MessageRequester_OK) ; Clear the list and show that the list really is empty ClearList(Numbers()) MessageRequester("Information", "There are "+Str(ListSize(Numbers()))+" elements in the list", #PB_MessageRequester_OK)
See Also
DeleteElement(), FreeList()
Supported OS
All