Hi,
Does anybody have experience of using the PRegEx_Sort() function of the
pregex xtra, I am baffled by what all the arguments mean and how to use
them, this is probably because it is Monday and I am being a bit thick.
Can it be used to sort a list of property lists, sorting the outer list
by the value of a property in each property list contained within.
The function specification in the PRegEx documentation is as follows:
------------------
PRegEx_Sort (List, DeepCopy, #SortFunction, [ArgList]) ==> NewList
Returns a new list consisting of a shallow OR Deep copy of the old
list, sorted according to the ordering implied by #SortFunction,
which takes as arguments two values (of any type), here dubbed A
and B, from the list to be compared, plus optional additional
arguments if required.
For any pair of items, #SortFunction must return -1 if A is less
than B, 0 if A == B, and 1 if A > B.
Sort does NOT modify the original list in any way, as Lingo's
"sort" function does. Rather, it makes a sorted copy which you
may, at your option, choose to use in place of the original.
------------------
It sounds like it does what I'm hoping it does, but I need help to
translate.
Many thanks
Tim
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[email protected] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]