Solved

How can i get a char's ascii value

Posted on 2000-02-16
4
116 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
Comment Utility
Use Ord(AChar)

Cheers,

Raymond.
0
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 0 total points
Comment Utility
As above...
0
 
LVL 6

Expert Comment

by:edey
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now