I could not reproduce this on 2006r4.

dim myArray()

myArray.Append "D1"
myArray.Append "S13"
...
myArray.Append "S8"

myArray.Sort

Gives the correct result:  D1, D2, S1, S10, S11, ...

Tim


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Tim
> Jones
> Sent: Monday, October 23, 2006 4:54 PM
> To: REALbasic NUG
> Subject: Re: Array.Sort order confusion
> 
> 
> On Oct 23, 2006, at 4:13 PM, Charles Yeomans wrote:
> 
> > I can't reproduce this using r3.
> 
> Mine was in R4 ... and I didn't recall this happening previously.
> 
> After working through this, I realized that the opportunity for up to  
> 9,999 iterations of each letter variant can occur, so I've changed  
> the tool that produces the output to provide the numeric component  
> with leading 0's.
> 
> I will put together an example later this evening.
> 
> Tim
> --
> Tim Jones                                     [EMAIL PROTECTED]
> 
> 
> >
> > Charles Yeomans
> > On Oct 23, 2006, at 6:40 PM, Tim Jones wrote:
> >
> >> Hi Folks,
> >>
> >> I've an array that will contain a list of values that consist of a  
> >> letter and then a number (non-zero padded).  The order the  
> >> elements are received is random.  For example:
> >>
> >> D1
> >> S13
> >> S1
> >> S2
> >> S12
> >> S10
> >> S11
> >> S3
> >> S4
> >> D2
> >> S14
> >> S15
> >> S5
> >> S9
> >> S7
> >> S6
> >> S8
> >>
> >> Given that list order, I issue the array.sort and expect something  
> >> that looks like this:
> >>
> >> D1
> >> D2
> >> S1
> >> S10
> >> S11
> >> S12
> >> S13
> >> S14
> >> S15
> >> S2
> >> S3
> >> S4
> >> S5
> >> S6
> >> S7
> >> S8
> >> S9
> >>
> >> However, the S1 is coming AFTER the S15 in the actual sort (in  
> >> this example).
> >>
> >> D1
> >> D2
> >> S10
> >> S11
> >> S12
> >> S13
> >> S14
> >> S15
> >> S1
> >> S2
> >> S3
> >> S4
> >> S5
> >> S6
> >> S7
> >> S8
> >> S9
> >>
> >> In all of my other sorts, S1 is less than S10
> >>
> >> Is this a bug, or is my expectation of ascending sorts somehow  
> >> misguided?
> >>
> >> Tim
> >> --
> >> Tim Jones                                  [EMAIL PROTECTED]
> >>
> >>
> >> _______________________________________________
> >> Unsubscribe or switch delivery mode:
> >> <http://www.realsoftware.com/support/listmanager/>
> >>
> >> Search the archives of this list here:
> >> <http://support.realsoftware.com/listarchives/lists.html>
> >
> > _______________________________________________
> > Unsubscribe or switch delivery mode:
> > <http://www.realsoftware.com/support/listmanager/>
> >
> > Search the archives of this list here:
> > <http://support.realsoftware.com/listarchives/lists.html>
> >
> 
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> 
> Search the archives of this list here:
> <http://support.realsoftware.com/listarchives/lists.html>
> 
> 

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to