Syntax
Moves the cursor of a map before its first entry, so that the next NextMapElement() goes to the first entry.
ResetMap(<map>())Parts
| <map> | The map, written with its empty parentheses: stock(). It must be a NewMap variable or a map field of a record. |
|---|
Good to know
- After
ResetMap, there is no current entry: readingm()stops the program with "BASIC map has no current element". FOREACHcalls it for you. UseResetMapwith aWHILE NextMapElement(m())loop.
Example
NewMap m.s()m("x") = "1"m("y") = "2"ResetMap(m())WHILE NextMapElement(m()) Console(MapKey(m()) + "=" + m()) ' x=1, y=2WENDIn the manual : Arrays, lists and maps