Solved

How can i get a char's ascii value

Posted on 2000-02-16
4
123 Views
Last Modified: 2010-04-04
Well, the title says it all, i use chr to do the opposite, but how can i do this?

thanks.
0
Comment
Question by:pin_plunder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Expert Comment

by:rwilson032697
ID: 2529564
Use Ord(AChar)

Cheers,

Raymond.
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 0 total points
ID: 2529565
As above...
0
 
LVL 6

Expert Comment

by:edey
ID: 2529688
just a note: ord will also give you the "ordinal" value of any enumerated type.  This function is/can be very important.

GL
Mike
0
 
LVL 2

Expert Comment

by:craig_capel
ID: 2530933
Ok and heres some sample code..... As Rwilson rightly puts it you use ord

var
 c: char;
begin
   c:='a';
   messagedlg('The Ascii Value of this char is: '+inttostr(ord(c)),mtconfirmation,[mbyes,mbno],0);
end;
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question