Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6268839aff62e6c1d3644a86952c3b222a2c8c02
Ticket: 71c0878b712d056d9c69dba6f72e0efce751e290
Strange results when second argument to [incr] is a list
User & Date: anonymous on 2017-03-05 09:23:52
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    First case (the variable "var" does not exist):
        % incr var {1 2}
        --> expected integer but got "1 2"
    This is the expected result.
    
    Second case (the variable "var" does not exist):
        % incr var [list 1 2]
        --> can't read "var": no such variable
    The error message is very misleading, as for [incr] the variable needs not to exist.
    
    Third case: this time we create "var" before [incr]easing it:
        % set var 1
        --> 1
        % incr var [list 1 2]
        --> 
        % set errorInfo
    
            (reading increment)
            invoked from within
        "incr var [list 1 2]"
    In this case the error message is the empty string.
    
    The problem does not show in 8.6.6
    
  5. foundin changed to: "f37dff89f9b3009ee44e5c830135c3f0e1ac4a52"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0d5810a6d532ee60fe454fd2bdbe8e482821d713"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "17. Commands I-L"
  15. title changed to:
    Strange results when second argument to [incr] is a list
    
  16. type changed to: "Bug"