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

How to handle large integers in Tcl8.4?

Status
Not open for further replies.

Fermulator

Programmer
Mar 16, 2007
10
CA
I'm trying to do some fancy footwork with HEX numbers. Basically, I want to take a HEX number, convert to decimal, add some number (integer) to it, and convert it back to HEX.

% set hex 0xFFFFFFFFFFFF
0xFFFFFFFFFFFF
% set hexInDec [expr $hex]
281474976710655
% set decBackToHex [format %x $hexInDec]
integer value too large to represent
while evaluating {set hexBackToHex [format %x $hexInDec]}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top