Menu

#3062 Manpage inconsistent for binary scan

obsolete: 8.5a2
closed-fixed
5
2005-02-10
2005-02-05
No

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

Discussion

  • Donal K. Fellows

    • labels: 105657 --> 12. ByteArray Object
     
  • Donal K. Fellows

    Logged In: YES
    user_id=79902

    The "unsigned" problem is still there; [binary scan] can
    read wide values...

     
  • Donal K. Fellows

    • status: open --> closed
     
  • Donal K. Fellows

    • status: closed --> closed-fixed
     
  • Donal K. Fellows

    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.

     
MongoDB Logo MongoDB