Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Manpage inconsistent for binary scan

Closed / Fixed1117017fffffffffffffffffffffffffffffffffCreated 22 years agoUpdated 22 years ago
Descriptionplain2005-02-05 20:54:43
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
dkfplain2005-02-09 21:12:33
Logged In: YES 
user_id=79902

The "unsigned" problem is still there; [binary scan] can
read wide values...
dkf Closed ticket [1117017fff]. [History diff]2005-02-10 17:29:48
dkfplain2005-02-10 17:29:49
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.
Log in (anonymous is fine) to add a comment.