Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c95ffb8544a134ce9eb86d1b199098fd96d6f032
Ticket: c3d956be5bb16eb7ad8e9980d74509cba4e8e1eb
[proc] doesn't work as documented
User & Date: pointsman on 2016-06-21 23:32:11
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    proc foo { {arg1 default} arg2} {
      puts $arg1
    }
    foo
    
    => wrong # args: should be "foo ?arg1? arg2"
    
    It would be more to the point, if the error message reads "should be
    "foo arg1 arg2"". But more than that: man n proc tells at the end of
    the first paragraph of the description:
    
       Arguments with default values that are followed by non-defaulted
       arguments become required arguments. In 8.6 this will be considered
       an error.
    
    Seems, they are not. Since I'm fine with the situation, as they was up
    to 8.6 (arguments with default values that are followed by
    non-defaulted arguments become required arguments) simplest solution
    would be to adjust the documentation (remove "In 8.6 this will be
    considered an error") until the implementation is already there.
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "pointsman"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "4ca203a8e925aecdd9419645f936bccf18cd6ea7"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "pointsman"
  14. subsystem changed to: "22. [proc] and [uplevel]"
  15. title changed to: "[proc] doesn't work as documented"
  16. type changed to: "Bug"