SORTNEXT()

SORTNEXT()

Top  Previous  Next

 

The SORTNEXT() function retrieves the next entry from a sort.

 

 

Format

 

SORTNEXT(sort.var, {{MAT} keys})

 

where

 

sort.varis a sort variable created by a previous use of SORT().

 

keysis the optional name of a single dimensional array to receive the key values associated with the retrieved item prefixed with MAT. For a single key sort, keys may be specified as a simple variable reference.

 

 
The two argument form of the SORTNEXT() function returns the data associated with the next entry in a sort. The keys are returned via the keys array.

 

The single argument form of the SORTNEXT() function returns the data associated with the next entry in a sort or, if the sort has no data element, a null string.

 

The STATUS() function should be used to determine whether the action was successful. This returns non-zero if there is no item to return.

 

 

See also:

Sorting, SORT(), SORTADD, SORTCLEAR, SORTDATA()