PreviousElement()

Syntax

Result = PreviousElement(List())
Description
Moves from the current element to the previous element in the list.

Parameters

List() The name of your list variable, created with the NewList function. You must include the brackets after the list name.

Return value

Returns the address of the data in the previous list element if successful and zero if there if there is no previous element.

Example

  NewList Numbers.w()

  For i=1 To 10
    AddElement(Numbers())
    Numbers() = i
  Next

  Repeat
    MessageRequester("Number", Str(Numbers()), #PB_MessageRequester_OK)
  Until PreviousElement(Numbers()) = 0

See Also

NextElement(), FirstElement(), LastElement(), SelectElement(), ListIndex()

Supported OS

All

<- PopListPosition() - List Index - PushListPosition() ->