Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: bdab65cc3e0bf3c4f609b1421000d4ddba748f1852141be38d8c6529d0fce1ab
Ticket: 6ee2f5d5d6bc7d697b735f5389d833ff9e61e217
Tcl 9.0 "invalid character in array index" error for $a("b")
User & Date: oehhar on 2026-07-30 10:01:19
Changes

  1. closedate changed to: "2461251.9175885879"
  2. icomment:
    Single backslash in variable name resolution also workes with 8.6:
    
    <verbatim>
    % set \\ x
    x
    % puts ${\}
    x
    </verbatim>
    
    On referencing with variables, a single "\" is taken as verbatim.
    On referencing with array indexes, a single "\" is stripped away.
    
    And this is also interesting with 9.0.4:
    
    <verbatim>
    % set \\ x
    x
    % puts ${\\}
    can't read "\\": no such variable
    % puts $\\
    $\
    </verbatim>
    
    So, a $\\ is verbatim interpreted - very interesting...
    There is no more verbatim way to express a variable name of "\"...
    
    Thanks for all,
    Harald
    
  3. login: "oehhar"
  4. mimetype: "text/x-fossil-wiki"
  5. username: "oehhar"