Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a2a07bc99fd6209319afb637381ffe94c1683e772a7a5cdd483fa0a451b07b82
Ticket: 6ee2f5d5d6bc7d697b735f5389d833ff9e61e217
Tcl 9.0 "invalid character in array index" error for $a("b")
User & Date: oehhar on 2026-07-30 09:48:58
Changes

  1. closedate changed to: "2461251.9090100462"
  2. closer changed to: "oehhar"
  3. icomment:
    Perhaps we can enhance the text in the migration guide:
    
    [https://core.tcl-lang.org/tcl/wiki?name=Migrating+scripts+to+Tcl+9&p]
    
    For me, this is not cristal clear in the TIP or migration guide, as it only speaks about "{" and "(" and not about '"' and "\".
    
    And it is not only about referencing:
    
    <verbatim>
    % set a(\) x
    x
    % array names a
    {}
    </verbatim>
    
    So, in array creation, any trailing "\" was stripped from the index without an error. This is probably a bug but anyway.
    
    In 9.0, the set causes an error.
    
  4. login: "oehhar"
  5. mimetype: "text/x-fossil-wiki"
  6. username: "oehhar"