Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting data in an array

Status
Not open for further replies.

mmtraining

IS-IT--Management
Mar 18, 2002
104
DE
I have got an array called Daten(400). In this array the data ist read in and looks like this:

Daten(1) contains se1_1
Daten(2) contains se2_1
Daten(3) contains se3_1
Daten(4) contains se1_2
Daten(5) contains se2_2
Daten(6) contains se3_2

How can I sort the contents of the array?

Thanx for any help :)

Carol, Berlin
 
Find the lowest value and switch it....


for i = 0 to uBound(daten)
lowVal = daten(i)
for j = i+1 to uBound(daten)
if daten(j) < lowVal then
lowVal = daten(j)
foundAt = j
end if
next
holdVal = daten(i)
daten(i) = lowval
daten(foundAt) = holdVal
next -- Just trying to help...
[wolf]<--- This is a wolf? We need a new icon.......
mikewolf@tst-us.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top