[futurebasic] Re: [FB] Re: Sorting problem

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1999 : Group Archive : Group : All Groups

From: Mikearrony@...
Date: Sun, 14 Nov 1999 19:36:55 EST
In a message dated 11/14/99 4:45:11 PM, russp@... writes:

<< I've been beating my head on this all day and I'm beginning to feel really
 stupid. I just need to do a simple sort on an array. I've tried several
 different things and nothing seems to work. >>

Try this.   It should do a swift easy sort.

 FOR x = 0 TO 5
    FOR y = x TO 5
      LONG IF menuArray$(x) >= menuArray$(y)
        SWAP menuArray$(x),menuArray$(y)
      END IF
    NEXT
  NEXT
Make sure all array elements are upper or lower case.   If mixed upper and 
lower then the upper case will be listed first.

Mike