Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 30ac8f37f30ec20142f3d65f1d5c9dfec857c1e7
Ticket: 1824688fffffffffffffffffffffffffffffffff
format should have a %b for converting integer to binary
User & Date: lvirden on 2007-11-02 14:46:56
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    the format function in tcl has conversion specifiers for converting to decimal, octal, and hexadecimal.
    
    I'm requesting a conversion specifier for converting to binary.
    
    There are times when one has a need, at least during debugging, to take a look at a variable's bit pattern to see what bits are on and off.  While one could certainly write tcl code to test each bit and output a 1 or a 0 in response, having a conversion character would allow Tcl to do the right thing. Given that Tcl supports 0bNNN for a built-in base specifier, it would seem natural to support perhaps %b to generate an appropriate string.
    
  4. foundin changed to: "None"
  5. is_private changed to: "0"
  6. priority changed to: "5 Medium"
  7. resolution changed to: "None"
  8. status changed to: "Open"
  9. submitter changed to: "lvirden"
  10. subsystem changed to: "11. Conversions From String"
  11. title changed to:
    format should have a %b for converting integer to binary
    
  12. type changed to: "RFE"