Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6d185b26075ad2d23ff28e2039704090a89af8b9
Ticket: 218532ffffffffffffffffffffffffffffffffff
request for empty name array syntax support
User & Date: nobody on 2000-10-26 01:01:49
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 915 RFE
    Version: 8.0.3
    SubmitDate: '1998-12-04'
    LastModified: '1999-08-06'
    Severity: MED
    Status: Released
    Submitter: welch
    ChangedBy: hobbs
    RelatedBugIDs: 822
    OS: Linux
    OSVersion: Redhat 5.1
    Machine: Other
    FixedDate: '1999-08-06'
    FixedInVersion: 8.2b1
    ClosedDate: '1999-08-06'
    
    
    Name:
    Jean-Luc Fontaine
    
    Extensions:
    BLT 2.4, TkTable 2.3, stooop 3.6.1, scwoop 2.4, tkpiechart 5.2
    
    CustomShell:
    see small patch above.
    
    DesiredBehavior:
    support of empty named array syntax, which would add consistency to the core:
    namespace a {
        variable {}
    }
    set a::(x) 0
    puts $a::(x)  ;# works with current tcl version
    namespace a {
        set (x) 0
        puts $(x) ;# should work as line above
    }
    Furthermore, it would greatly enhance stooop's performance and make it much less verbose.
    
    Patch:
    *** generic/tclCompile.c.orig   Sat Sep  5 11:00:09 1998
    --- generic/tclCompile.c        Sat Sep  5 11:01:55 1998
    ***************
    *** 3151,3157 ****
                      c = *src\;
                  \}
            \}
    !       if (src == name) \{
                /*
                 * A '\$' by itself, not a name reference. Push a \"\$\" string.
                 */
    --- 3151,3157 ----
                      c = *src\;
                  \}
            \}
    !       if ((src == name) && (*src != '(')) \{
                /*
                 * A '\$' by itself, not a name reference. Push a \"\$\" string.
                 */
    *** generic/tclParse.c.orig     Sat Sep  5 11:02:52 1998
    --- generic/tclParse.c  Sat Sep  5 !
    11:01:55 1998
    ***************
    *** 813,819 ****
                    string++\;
                \}
            \}
    !       if (string == name1) \{
                if (termPtr != 0) \{
                    *termPtr = string\;
                \}
    --- 813,819 ----
                    string++\;
                \}
            \}
    !         if ((string == name1) && (*string != '(')) \{
                if (termPtr != 0) \{
                    *termPtr = string\;
                \}
    
    PatchFiles:
    generic/tclCompile.c
    generic/tclParse.c
    
    
    
    A patch for Tcl 8.1 is also available: please let me know if you also want it.
    I am also emailing a corresponding test suite file to Brent.
    
    This was introduced in 8.2b1. 
    -- 08/06/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.0.3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "request for empty name array syntax support"
  11. type changed to: "Bug"