ResetList

List command

Syntax

Moves the cursor before the first element, so that the next NextElement() lands on the first one.

ResetList(<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.
  • After it there is no current element: reading a() stops the program with "BASIC list has no current element".
  • An AddElement() or InsertElement() right after it adds the element in first place.
  • After FreeList(), the call stops the program with "BASIC list is not initialized".

Example

NewList a.integer()FOR k = 1 TO 3  AddElement(a())  a() = kNEXTResetList(a())WHILE NextElement(a())  Console(Str(a()))   ' 1, 2, 3WEND
In the manual : Arrays, lists and maps