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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SORTING

Status
Not open for further replies.

Rob222

ISP
Dec 31, 2001
2
GH
hey....anybody familiar with the algorithm/method to sort out a set of characters in ascending order of ASCII codes?

HOW DO WE CONVERT FROM A CHARACTER TO ITS ASCII CODE?

THANKS
 
<giggles>

When a character is stored in the computer it IS in ASCII code! There is no need to convert it!!!

However, if you are not yet quite familiar with the ASCII code:
for digits: add 48 to the digit to get the ASCII code.
for LARGE LETTERS: add 64 to the letter's order in the alphabet. A=65, Z=90
for small letters: add 96 to the letter's order in the alphabet. A=97, Z=122

&quot;Information has a tendency to be free. Which means someone will always tell you something you don't want to know.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top