Could someone please help me with sorting an array using ARRAY SORT? Suppose that I have:
Dim CemNam$(20)
and only the first five items are occupied; the rest are blank. They are:
CemNam$(1)="Wilson"
CemNam$(2)="Smith"
CemNam$(3)="Thomas"
CemNam$(4)="Brown"
CemNam$(5)="Anderson"
When I do an ARRAY SORT CemNam$() the names are sorted, but they are moved to the end of the array. I understand why this occurs, but is there a way to keep them at the front quickly? My routine takes about eight seconds.
I was attempting to do something like this:
ARRAY SORT CemNam$() For 1 to Kount
If Kount=5, I mistakengly thought it would sort just the first five elements. Could someone show me what I am misunderstanding please?
Thank you.
Robert
Dim CemNam$(20)
and only the first five items are occupied; the rest are blank. They are:
CemNam$(1)="Wilson"
CemNam$(2)="Smith"
CemNam$(3)="Thomas"
CemNam$(4)="Brown"
CemNam$(5)="Anderson"
When I do an ARRAY SORT CemNam$() the names are sorted, but they are moved to the end of the array. I understand why this occurs, but is there a way to keep them at the front quickly? My routine takes about eight seconds.
I was attempting to do something like this:
ARRAY SORT CemNam$() For 1 to Kount
If Kount=5, I mistakengly thought it would sort just the first five elements. Could someone show me what I am misunderstanding please?
Thank you.
Robert
Comment