Listdestroy |
Top Previous Next |
Prototype
ListDestroy(IntHandle)
Description
Destroys the list previously created
Parameters
IntHandle: integer value corresponding to the list handle.
Returned value
None.
Notes
None.
Example
//It creates a new list HandleList:=ListCreate;
//It adds element to the list ListAddItem(HandleList,'Element 1'); ListAddItem(HandleList,'Element 2'); ListAddItem(HandleList,'Element 3');
//It counts list element TotalElements:=ListCount(HandleList); ShowMessage('The element counted are: '+IntToStr(TotalElements));
//It finds element Index IndexElements:=ListIndexOfItem(HandleList,'Element 2'); ShowMessage('Element 2 is in position '+IntToStr(IndexElements));
//It deletes an element if (IndexElements>=0) and (IndexElements<TotalElements) then ListDelete(HandleList,IndexElements);
//It destroys the list ListDestroy(HandleList);
|