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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hex to Int Conversion

Status
Not open for further replies.

shussai2

Programmer
Aug 28, 2003
42
CA
Hi,

I was wondering how to convert hexidecimal value say F into its int represntation of 15. And show it on screen. Please ignore the question below it (the one I asked about hexadecimal conversion) i have figured it out.

Please answer this question though. Thanks.
 
The scan command is your friend:

[tt]% set x 3e5f
3e5f
% scan $x %x
15967[/tt]

Also see the Tcl'ers Wiki, starting with page "scan,"
- Ken Jones, President, ken@avia-training.com
Avia Training and Consulting, 866-TCL-HELP (866-825-4357) US Toll free
415-643-8692 Voice
415-643-8697 Fax
 
Once again Thank you Mr. Jones for your help.

Regards,

Sajjad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top