$ORDER

$ORDER(variable name{,integer code})

Returns the subscript of the previous or next sibling in collating sequence of a specified array node.

To obtain the first subscript of a level, specify a null subscript in the argument.