COLLECTION.DUMP Function
Syntax
Key_Data_List as C = Dump(C format)
Arguments
- format
Specifies the format of the data in the output string. The Format_String can contain the keyword " key " to extract the key value and " value " to extract the data value. For example, the Format_String " key, value " would output the key value, then a comma, then a space then the data value.
Description
Dump collection out to string.
Discussion
The <COLLECTION>.DUMP() method returns all of the data (key and data) in the specified collection in a CR-LF delimited string. Contrast this with the <COLLECTION>.ENUM_ALL() method which outputs only the key values into a CR-LF delimited string.
Example
The following code in the Interactive window defines a collection and then creates a variable, y, with the data in the collection.
dim mycollection as u mycollection.SET("FJ","Fred Jones") mycollection.SET("BB","Bryan Boyd") mycollection.SET("KL","Kim Lee") mycollection.SET("KB","Karen Boyd") mycollection.SET("EL","Erica Loyd") y = mycollection.DUMP("key@value") ? y = "FJ@Fred Jones BB@Bryan Boyd KL@Kim Lee KB@Karen Boyd EL@Erica Loyd "
See Also