COLLECTION() |
|
|
The COLLECTION() function creates a data collection variable.
Format
COLLECTION() COLLECTION(var)
The first form of the COLLECTION() function creates an empty data collection variable.
The second form of the COLLECTION() function copies an existing data collection to create a new collection variable. Note that simply copying the collection variable with a statement such as NEW.COLLECTION = OLD.COLLECTION creates a second reference to the same data collection, not an independent copy. This is very similar in concept to copying file variables or socket variables.
Examples
CLI = COLLECTION() CLI{'name'} = CLIENT.NAME
This program fragment creates an empty data collection in variable CLI and then adds an element to hold a client name.
NEW.CLI = COLLECTION(CLI)
See also: |