Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Sorting multiple fields at one time......

From: rebol:ccsducto:ar at: 3-Apr-2006 9:47

Hi John, to sort by more than one field you can do this: sort/skip/compare sortBlock 4 [1 4] This is SORT a serie 4 by 4 and compare the fields 1 and 4 4 is for /skip refinement [1 4] is for /compare refinement You can use any field in any order, for instance [4 3 2 1] or [3 1 2] or 4 For just one field you can use the integer (not block), the first field is the default Regards CÚsar ----- Original Message ----- From: "John Dutcher" <jfdutcher1958-yahoo.com> To: <rebolist-rebol.com> Sent: Tuesday, March 21, 2006 7:09 AM Subject: [REBOL] Sorting multiple fields at one time......
> The script below works fine ..... and sorts the 'first' of the (4) fields
which make up a 'logical' set into order, re-arranging the 'records' in the process.
> I have tried various options of the 'sort' syntax in trying to get the
sort to sort either the
> first three fields (primary, 1st secondary, 2nd secondary) or,
alternatively.....all (4) fields (if the last field is included.....not a problem)....but the Rebol syntax checker doesn't like any of them.