Hi,
Im trying to write a small database program for fun, can anyone explain to me how to alphetically sort a list of names and surnames ?
Ive looked at an example in the code archives on how to do this, but its using types and Im using arrays, which have stored strings and it isnt clear to me how that example works. (below)
[url]http://www.blitzbasic.com/codearcs/codearcs.php?code=181[/url]
I've managed to sort them based on the lowercase ASCII value of the 1st letter of each name, as long as all 5 names start with a different letter it all works...
So next I have to consider how to calculate what name comes first in the list.
So how can I extend my first letter test to the whole name, please, or am i going about it all wrong? thanks in advance. Any help is much appreciated.
Im trying to write a small database program for fun, can anyone explain to me how to alphetically sort a list of names and surnames ?
Ive looked at an example in the code archives on how to do this, but its using types and Im using arrays, which have stored strings and it isnt clear to me how that example works. (below)
[url]http://www.blitzbasic.com/codearcs/codearcs.php?code=181[/url]
I've managed to sort them based on the lowercase ASCII value of the 1st letter of each name, as long as all 5 names start with a different letter it all works...
So next I have to consider how to calculate what name comes first in the list.
So how can I extend my first letter test to the whole name, please, or am i going about it all wrong? thanks in advance. Any help is much appreciated.