AnsweredAssumed Answered

vrf - Sorting an array of records by TWO elements

Question asked by VRFuser on Jul 2, 1999
Hi all,

I am trying to create a vee program that sorts an array of records by two of it's elements.
The sort command allows you to sort by one element only.

For example;
Say I had an array of users with Name and Sex
  Fred, Male ..
  Barny, Male ..
  Wilma, Female ..
  Pebbles, Female ..
  Bam-Bam, Male ..

How could I sort firstly by Sex, then by Name

The sorted array should be
  Pebbles, Female
  Wilma, Female
  Bam-Bam, Male
  Barny, Male
  Fred, Male

Anyone ever done this ???

Thanks for any help.

James


Outcomes