Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Sorting Names
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Beast_




PostPosted: Wed Jan 25, 2006 7:51 pm   Post subject: Sorting Names

Hey, I need help sorting names, alphabetically. I have two variables, which consist of 'firstname' and 'lastname'. I need to have the lastname data sorted out alphabetically, so my list of names are in order.

Ie :
(lastname), (firstname)
Smith, John
Turing, Alan


Your help is appreciated. Thanks
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Wed Jan 25, 2006 8:10 pm   Post subject: (No subject)

Sorting is easy. Zylum has compiled a bunch of sorting methods that are found in [Turing Source Code].

To sort strings, you just have to change the int stuff to strings. You can compare strings using the >, <, <=, =, and >= operators.

code:

if "Minsc" > "Edwin" put
    put "Go for the eyes Boo, GO FOR THE EYES!! RrraaaAAGHGHH!!!"
end if
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: