SBM ModScript Reference → Programming SBM ModScript → Language Types → Range types
The Range classes provide iteration for containers. The underlying container must persist while interacting with a Range based on that container.
The following classes are Range classes. In general, these classes are not used directly; instead, invoke range(container) to create a Range for a container.
Map_Range – Provides iteration for the Map class. Entries will be of type Map_Pair.
String_Range – Provides iteration for the String class. Entries will be of type char.
Vector_Range – Provides iteration for the Vector class. Entries will be the items that were in the Vector.
CAppRecordList_Range – Provides iteration for the AppRecordList class. Entries will be AppRecord or child classes.
Dictionary_Range – Provides iteration for the Dictionary class. Entries will be of type Dictionary_Pair.
In general, a Range is generated using range(container).
A quick way to access the last item in an AppRecordList (or any container) is range(myList).back();
Ranges are used frequently in algorithms. For more information, see Part 5 - Algorithms and Lambdas.
A Range can be iterated using a ChaiScript for loop.
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.