Go Back   Forums > Community Chatterbox > Tech Corner > Programming
Memberlist Forum Rules Today's Posts
Search Forums:
Click here to use Advanced Search

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 12-03-2005, 06:21 PM   #1
Koen
Game Wizzard
 
Koen's Avatar

 
Join Date: Nov 2004
Location: Nootdorp, Netherlands
Posts: 226
Default

I'm looking for a fast sorting algorythm to alphabetically sort a list from A to Z.

Code:
Dim Title() as String, NumOfTitles as Long
Dim Temp as String
Dim I as Long, J as Long
This algorythm I always use is too slow, can anyone write a better (optimized) algorythm?

Code:
For I = 1 To NumOfTitles
 *For J = 1 To NumOfTitles
 * *If LCase(Title(I)) < LCase(Title(J)) Then
 * * *Temp = Title(I)
 * * *Title(I) = Title(J)
 * * *Title(J) = Temp
 * *End If
 *Next J
Next I
BTW, is there a function left like the old QB's Swap(String1, String2)?
Koen is offline                         Send a private message to Koen
Reply With Quote
 


Similar Threads
Thread Thread Starter Forum Replies Last Post
Game Sorting Sugestion.. LingonKungen Old Suggestions 9 13-06-2007 06:41 AM
Fastest Ever Beated A Game? Mr.Snuggles Gaming Zone 46 14-11-2005 11:08 PM
Sorting Options eric10051981 Old Suggestions 1 17-06-2004 09:18 AM


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
 


The current time is 11:19 PM (GMT)

 
Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.