For Programmers: Free Programming Magazines  


Home > Archive > Tcl > October 2006 > Re: "Error : integer value too large" when converting hexa to binary via bi









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: "Error : integer value too large" when converting hexa to binary via bi
Aric Bills

2006-10-04, 4:05 am

The "I" in the line

> binary scan [binary format I $hexa] B* binStr


means "32-bit integer". When $hexa is a larger number than can be
represented in 32 bits, [binary format] can't do the job you've asked
it to do.

If you need to be able to convert numbers of arbitrary size, take a
look at this wiki page, which provides some generalized procedures for
converting integers into base-2 strings:

http://wiki.tcl.tk/15598

Regards,
Aric

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com