The man page for binary scan is not consistent on its
treatment of unsigned vs signed issues.
In the general part it recommends to use masking with
0xff..., while in the specific parts for c and s format
specifiers it tells one should use expr (0x100+$val) %
0x100
A second smaller issue can be found in the description
of the 'i' format specifier:
"Note that the integers returned are signed and cannot
be represented by Tcl as unsigned values. "
since Tcl 8.4 with wide() its untrue, as we have a
larger datatype than the signed 32-bit int.
Michael
Logged In: YES
user_id=79902
The "unsigned" problem is still there; [binary scan] can
read wide values...
Logged In: YES
user_id=79902
Tidied up; docs are now consistent about how to strip the
sign and don't claim that it is impossible to represent an
unsigned 32-bit quantity.