Converting ASCII and Characters

by Mar 6, 2009

To convert the ASCII value to a character, use type casting like this:


To do the opposite and convert a character to its ascii value, use this:


Here, the letter "A" is first converted into a Char type, then into an Integer value.

To process more than one character at a time, use arrays instead: