How do I convert a character into ASCII number?

What do I need to do in order to convert a single character into its ASCII number? And how would I do the reverse... ASCII to Character?

Thanks
ripcordAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
viktornetConnect With a Mentor Commented:
Here it is....

var
 Value : integer;
 ch : char;
begin
 Value := Ord('A');
 ch := Chr(Value);
end;

Regards,
Viktor Ivanov
0
 
viktornetCommented:
Actually value doesn't need to be an integer....it could be of type BYTE

Regards,
Viktor Ivanov
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.