Move the record pointer to the next or previous unique key in the controlling order.
XSharp.RT (in XSharp.RT.dll) Version: 2.5
nDirection AS USUAL
) AS USUAL
public static Usual OrdSkipUnique(
- Type: Usual
Specifies whether the function will skip to the next or previous key. Omitting this value or specifying it as 1 skips to the next unique key. Specifying a negative value skips to the previous key.
TRUE if successful; otherwise, FALSE.
OrdSkipUnique() allows you to make a non-unique order look like a unique order.
Each time you use OrdSkipUnique(), you are moved to the next (or previous) unique key, exactly as if you were skipping through a unique order.
This function eliminates the problems associated with maintaining a unique order, while providing you with fast access to unique keys.
By default, this function operates on the currently selected work area.
It can be made to operate on an unselected work area by specifying it within an aliased expression
This examples uses OrdSkipUnique() to build an array of unique last names beginning with the letter "J:"
2 LOCAL aLast
3 SET INDEX TO last
4 ? OrdIsUnique()
5 SET SCOPE TO "J"
6 GO TOP
7 DO WHILE !EOF()
8 AADD(aLast, Last)
11 SET SCOPE TO
12 RETURN aLast