SBM ModScript Reference → Programming SBM ModScript → Language Types → Pair, Map_Pair, and Dictionary_Pair
The Pair class stores two objects.
In Pair, both first and second can store any object type. It is convenient in a situation in which you need to store two items, such as the AppDb "WithSQL" functions that use a Vector of Pairs for the SQL parameters.
Pair() – Creates an empty Pair object.
Pair(Pair p) – Creates a Pair with a copy of p.
Pair(object first, object second) – Creates a Pair initialized with first and second.
The entries in a Map will be of type Map_Pair. In Map_Pair, first is a string; second is any object type.
Map_Pair() – Creates an empty Map_Pair object.
Map_Pair(Map_Pair p) – Creates a Map_Pair with a copy of p.
Map_Pair(string first, object second) – Creates a Map_Pair initialized with first and second.
Dictionary is a class for supporting dictionary objects in scripts that are converted from SBM AppScript to SBM ModScript, in general, use ChaiScript's Map instead. Entries in Dictionary will be of type Dictionary_Pair. In Dictionary_Pair, first is a string; second is a Variant.
Dictionary_Pair() – Creates an empty Dictionary_Pair object.
Dictionary_Pair(Dictionary_Pair p) – Creates a Dictionary_Pair with a copy of p.
Dictionary_Pair(string first, Variant second) – Creates a Dictionary_Pair initialized with first and second.
Copyright © 2007–2019 Micro Focus or one of its affiliates. All rights reserved.