# File

> [HTML Version](file_xtree.htm)

This specifies a sequential file to be used for input instead of the _array_ parameter. When non-null, the interpretation of _array_, _addcnt_, and _answer_ parameters changes as follows.

If neither the multiple selection (XTF\_MSEL) nor XTF\_FILANS flags are set, then _array_ becomes an ordinary string, which is used to pass in the default selection (text) and to get back the item chosen by the user, and _answer_ is ignored. Note that here the default selection mechanism works only on the first column; if its cells are not all unique, you may not end up with the desired item selected. The workaround is to use XTF\_FILANS to select the default by row number, or to add a first column that is unique.

If XTF\_MSEL is not set but XTF\_FILANS is set, then _array_ is still treated as an ordinary string which returns the text of the item chosen, but _answer_ is used exactly as in array mode (to return the row number of the selected item, and to pass in the default row number).

If the multiple selection flag (XTF\_MSEL) is set, then _array_ is ignored and _answer_ is treated as an array of one byte selection flags, exactly as for multiple-selection array mode. _addcnt_ should be set to 0 to load the entire file, or else set to the number of records (lines) to be loaded.

The default selection process (in single-selection mode) works only on the first column. If the cells in the first column are not all unique, then you may not end up with the desired item selected. The only workaround is to add a first column that is unique, or to switch to the array mode, which identifies selections by the array index. Also note that XTREE supports the PCKLST "hidden text" feature, which allows you to pass hidden text in the last column of the data by preceding it with a \\. Although this technique is useful for associating control information with list items without having to display it, a better way to do this with XTREE is to just define a hidden column. The \\hidden text feature is preserved just for compatibility with PCKLST.

XTREE supports the PCKLST "hidden text"feature, which allows you to pass hidden text in the last column of the data by preceding it with a backslash ("\\").  Although this technique is useful for associating control information with list items without having to display it, the feature is support merely for backward compatibility with PCKLST and is otherwise deprecated. The preferred approach to embedding hidden data with XTREE is to define a separate hidden column. Note that in CSV mode (a variation of file mode; see [XTF2\_CSV](xtf2_csv.md)), the special treatment of the backslash applies to every column, not just the last. To treat the backslash as a normal data character, use the advanced [Coldef](coldef.md) feature [XTF\_COLDFX](xtf_coldfx2.md) and add the "\\" code to the _[Cformat](cformat.md)_ specification for any column.