NextElement()
Syntax
Result = NextElement(LinkedList())Description
Moves from the current element to the next element in the list, or onto the first element if you have previously called ResetList()
Parameter:
LinkedList() - The name of your linked list variable, created with the NewList function. You must include the brackets after the list name.
Return value:
The value returned by this function can be used to show whether the next element exists or not (it will not exist if you are at the end of the list). If the next item exists, this function will return a value which is not equal to zero. If the next element does not exist then it will return a value of zero.
Advanced users only:
The value that this function returns is a pointer to the next element data or zero if the next element does not exist.
Example:NewList Scores.w() For i=1 To 10 AddElement(Scores()) Scores() = 100 - i Next ResetList(Scores()) While NextElement(Scores()) ; This is OK since the first call to NextElement() will move the current element to the first item in the list MessageRequester("Score", Str(Scores()), #PB_MessageRequester_OK) Wend
Supported OS
All