Please enable JavaScript to view this site.

A-Shell Consolidated Reference

This parameter specifies a number of items—i.e. "rows"—with the precise meaning being relative to the opcode, as shown in the following table. itemcount may be specified by any numeric data type.

XTR.OPCODE

itemcount interpretation

XTROP_CREATE

For array mode, set to # of items to load from the data array parameter. For file mode, set to 0 to load the entire file.

XTROP_REPLACE

Same as for XTROP_CREATE. If less than the number of items already in the tree, the excess items will be deleted from the tree.

XTROP_APPEND

# of items to append (from the data array parameter to the end of the existing items in the tree)

XTROP_DELETE

Ignored

XTROP_RESELECT

# of items currently in the tree (see Comments)

XTROP_DELSEL

Same as for XTROP_RESELECT

XTROP_PRINT

If tree doesn't already exist, set to # of items to load from the data array. Else set as for XTROP_RESELECT.

Definition file: ashell.def

 

Comments

In PCKLST, itemcount specified the maximum number of items in the input array, and was ignored for file mode. XTREE obeys it for both array and file mode, but interprets 0 as meaning to load the entire file.
Note that when loading an array starting from some position other than the first element, itemcount must be adjusted so that it does not cause the input operation to run past the end of the array.
For operations that don't involve adding data but may involve processing an answer array (such as XTROP_RESELECT and XTROP_DELSEL), itemcount is mainly needed in order to identify the number of elements in the answer array when the answer parameter is specified as an array element (rather than as an unformatted variable overlaying the entire array).
Note: this parameter (itemcount) was previously known as addcnt. The documentation was changed in January 2011 to make its m&eaning clearer.