Data Array Items


Can Data Arrays contain a Data Dictionary? I know the documentation indicates that Data Dictionaries can contain a Data Array.


This sample code shows that it is possible to have a Data Dictionary within a Data Array:

local theDictionary,theDataArray
initializedictionary theDictionary,“RecordID”, “765”,“Version”, “1”
theDataArray=dataarray(theDictionary,"hello world")
message array(theDataArray,2)
// returns: hello world
message dumpdictionary(array(theDataArray,1))
// returns: Version=1
//          RecordID=765


Both Data Arrays and Data Dictionaries can contain any kind of data, including other Data Arrays and Data Dictionaries. This is the big advantage of using a Data Array instead of a Text Array. If you don’t need that, Text Arrays are usually simpler to work with.