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

conversion from decimal to hexadecimal!!!

Status
Not open for further replies.

sergelaurent

Technical User
Joined
May 30, 2005
Messages
52
Location
FR
I have the following code:

set PIX_ACPPBOX_ERROR_BASE 0x100000;
set PIX_TOO_MANY_OFFSET_REF [expr $PIX_ACPPBOX_ERROR_BASE | 0x108];

while executing the logical or command, the returned result is in decimal format!!!
The problem is that i am using a switch where only hexadecimal values are used!!!

My question is, can I force the resulting result of the logical of to be in the hexadecimal format or how can I convert the result in hexadecimal?
 
Hi

Code:
set PIX_ACPPBOX_ERROR_BASE 0x100000;
set PIX_TOO_MANY_OFFSET_REF [red]"0x[format "%x" [/red][expr $PIX_ACPPBOX_ERROR_BASE | 0x108][red]]"[/red];


Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top