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

ord question

Status
Not open for further replies.

jewel464g

Technical User
Jul 18, 2001
198
US
Could someone pleae help me to understamd how

ord(7) = 55

I'm just not grasping the ord function.

When faced with a decision, always ask, 'Which would be the most fun?'
 
ord() returns the ASCII value of the argument. The ASCII value of 7 is 55. Try doing ord(a) and you should get 97.

There's always a better way. The fun is trying to find it!
 
characters uses a screen representation called a font to display binary data. So when you are working with characters in like c you could add characters to characters because your adding binary data. And ord is just another representation of binary data. This allows you to work with characters like they are numbers.

Not a masterful explaination but a simple generalization.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top