Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5a699eef7a44f5c9b883aca01932810e550faa8d
Ticket: 2002328fffffffffffffffffffffffffffffffff
format cmd differs from ANSI sprintf in rounding
User & Date: nobody on 2008-06-25 09:31:29
Changes

  1. assignee changed to: "davidw"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    The manual page for the format command lists the differences from the ANSI sprintf function:
    http://www.tcl.tk/man/tcl/TclCmd/format.htm#M22
    
    This list doesn't tell that the Tcl format command does rounding, which is quite a difference:
    [format "%.0f" 1.9] returns "2", while
    sprintf("%.0f", 1.9) returns "1".
    
  4. foundin changed to: "obsolete: 8.4.19"
  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: "nobody"
  10. subsystem changed to: "75. Tutorial"
  11. title changed to: "format cmd differs from ANSI sprintf in rounding"
  12. type changed to: "Bug"