PureBasic - LinkedList
Overview
Linked Lists are structures for storing data which are dynamically allocated depending of your need. It is a list of elements (the data you want to store) and each element is fully independant of the others. You can add as many elements you want (or as many as will fit into the memory of your computer), insert elements at the position you need, delete some other and more. This kind of data management is very useful as it's one of the best ways to handle data when you do not know how many elements you will need to store, or if you are often changing how many elements there are.
Before you can work with LinkedLists, you must declare them first. This could be done with the keyword NewList. For saving the contents are also often used structures.
To specifically search the contents of a LinkedList, using of loops is recommended: For : Next, ForEach : Next, Repeat : Until or While : Wend.
Command Index
AddElement
ChangeCurrentElement
ClearList
CountList
DeleteElement
FirstElement
InsertElement
LastElement
ListIndex
NextElement
PreviousElement
ResetList
SelectElement
SwapElements
Example
LinkedList.pb
Supported OS
All