Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I convert a character to its ascii hex code?

Status
Not open for further replies.

djensen47

Programmer
Sep 29, 1999
1
US
I need to get the ascii codes of a single characters but I can' seem to find a Tcl command that does this. I did find that if I have the ascii code I can convert to a char but not the other way around. Does anyone know that command that does this? Thanks.
 
How about:<br>
<br>
set ch &quot;A&quot;<br>
scan $ch &quot;%c&quot; i<br>
puts $i
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top