【发布时间】:2013-11-27 18:34:59
【问题描述】:
我正在尝试将 64 位二进制字符串值 () 转换为整数,但我显然达到了 tcl 限制并得到:
integer value too large to represent
二进制字符串:
000000000000101000000000000010100000000000000100
我用来从二进制转换为整数的过程是:
proc binary2decimal {bin} {
binary scan [binary format B64 [format %064d $bin]] I dec
return $dec
}
我尝试使用 64 进行格式化,也尝试了 LI 无济于事。我读到了“wide”,但不明白是否可以在这里应用。
P.S:我使用的是 tcl 8.4
【问题讨论】: