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
Solved

How can i get a char's ascii value

Posted on 2000-02-16
4
120 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
  • 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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Newbie Thread Programming 1 161
FMX enumerated colours 2 115
Show Listview image from database (String field) 5 135
select query - oracle 16 100
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…

840 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