Syntax
Makes the element saved by the last PushListPosition() current again, and removes it from the stack.
PopListPosition(<list>())Parts
| <list> | A list declared with NewList, written with its empty parentheses: scores(). |
|---|
Good to know
- Returns nothing: write it on its own line.
- With an empty stack, the program stops with "BASIC list position stack is empty".
- If the saved element was deleted in the meantime (by DeleteElement(), ClearList(), SplitList()…), the program stops with "Remembered BASIC list element no longer exists".
Example
NewList a.integer()FOR k = 1 TO 3 AddElement(a()) a() = kNEXTFirstElement(a())PushListPosition(a())LastElement(a())PushListPosition(a())SelectElement(a(), 1)PopListPosition(a())Console(Str(a())) ' 3PopListPosition(a())Console(Str(a())) ' 1In the manual : Arrays, lists and maps