In array mode, specifies an array of strings to be loaded into the list box. The interpretation and parsing of these strings into columns is determined by the coldef parameter. To pass the array to XTREE, you may either specify a specific starting element (e.g. ARRAY(1)) or an unformatted variable under which the array is defined (ARRAYX in the example below). Note that you can use DIMX to dynamically allocate the array (either a simple array or a Dynamic Array of Structures), in which case you have to pass it to XTREE via the starting element.
MAP1 ARRAYX ! unformatted variable
MAP2 ARRAY(50),S,100
Each array element must have at least one trailing null byte. Note that by using the overlay feature, you could support several array layouts with the same XTREE statement, i.e.
MAP1 ARRAYX2,@ARRAYX ! overlay on ARRAYX above
MAP2 ARRAY2(10),S,60 ! array of ten sixty byte strings
MAP1 ARRAYX3,@ARRAYX ! yet another overlay
MAP2 ARRAY3(80),S,8 ! array of eighty 8 byte strings
Any text in an individual cell (in array mode) or line (in file mode) which follows a backslash ("\") will be hidden from view (unless the cformat \ switch is specified).
In single-selection file mode, the array parameter is interpreted as an ordinary string to return the text of the selected items (all columns, but with right-justified columns stripped of trailing blanks.) If the XTF_FILANS flag is set, then array is ignored on entry; otherwise it should contain the text of the item to initially select, as returned from the prior call. In CSV mode (see XTF2_CSV), although the return string will contain all the columns (comma-delimited), on entry only the first column is used for locating the initially selected item. If you need more precision than that, use the XTF_FILANS flag/method.
In multiple-selection file mode, the array parameter is ignored. The selection information is passed via the array of one byte flags in the answer parameter, just as in multiple-selection array mode.