Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 4bc0c6f1daa4ed7407c776ecbf1000a71ef1dcdb
Ticket: 217827ffffffffffffffffffffffffffffffffff
empty named array support
User & Date: nobody on 2000-10-26 00:44:24
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 1532 RFE
    Version: 8.0.5
    SubmitDate: '1999-03-18'
    LastModified: '1999-04-05'
    Severity: MED
    Status: Closed
    Submitter: welch
    ChangedBy: stanton
    RelatedBugIDs: 977
    OS: Linux-Red Hat
    OSVersion: 5.2
    Machine: Other
    FixedDate: '2000-10-25'
    ClosedDate: '1999-04-05'
    
    
    Name:
    
    Jean-Luc Fontaine
    
    
    
    Extensions:
    
    BLT-2.4, Tktable-2.4, stooop-3.7, scwoop-2.6, tkpiechart-5.2.2
    
    
    
    CustomShell:
    
    see above
    
    
    
    DesiredBehavior:
    
        This patch for tcl8.0.5 make the following code possible: 
    
        
    
        set ($this,m) x
    
        puts $(this,m) ;# instead of $className::($this,m)
    
        thus making the stooop OO extension much less verbose when accessing
    
        class data members, and much faster too! 
    
        
    
        This also adds some 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
    
        }
    
        
    
    
    
    
    
    
    
    Patch:
    
    *** generic/tclCompile.c.origWed Mar 17 21:49:18 1999
    
    --- generic/tclCompile.cWed Mar 17 21:49:31 1999
    
    ***************
    
    *** 3152,3158 ****
    
                      c = *src;
    
                  }
    
      }
    
    ! if (src == name) {
    
          /*
    
           * A '$' by itself, not a name reference. Push a "$" string.
    
           */
    
    --- 3152,3158 ----
    
                      c = *src;
    
                  }
    
      }
    
    !   if ((src == name) && (*src != '(')) {
    
          /*
    
           * A '$' by itself, not a name reference. Push a "$" string.
    
           */
    
    *** generic/tclParse.c.origWed Mar 17 21:49:25 1999
    
    --- generic/tclParse.cWed Mar 17 21:49:31 1999
    
    ***************
    
    *** 813,819 ****
    
      string++;
    
          }
    
      }
    
    ! if (string == name1) {
    
          if (termPtr != 0) {
    
      *termPtr = string;
    
          }
    
    --- 813,819 ----
    
      string++;
    
          }
    
      }
    
    !         if ((string == name1) && (*string != '(')) {
    
          if (termPtr != 0) {
    
      *termPtr = string;
    
          }
    
    *** tests/parse.test.origWed Mar 17 21:55:46 1999
    
    --- tests/parse.testWed Mar 17 21:56:54 1999
    
    ***************
    
    *** 181,189 ****
    
          set b
    
      } {a$!}
    
      test parse-5.12 {array variable substitution} {
    
    !     set b a$()
    
    !     set b
    
    ! } {a$()}
    
      catch {unset a}
    
      test parse-5.13 {array variable substitution} {
    
          catch {unset a}
    
    --- 181,188 ----
    
          set b
    
      } {a$!}
    
      test parse-5.12 {array variable substitution} {
    
    !     list [catch {set b a$()} msg] $msg
    
    ! } {1 {can't read "()": no such variable}}
    
      catch {unset a}
    
      test parse-5.13 {array variable substitution} {
    
          catch {unset a}
    
    
    
    
    
    
    
    
    
    PatchFiles:
    
        generic/tclCompile.c
    
        generic/tclParse.c
    
        tests/parse.test
    
        
    
    
    
    
    
    
    
    
    
  4. foundin changed to: "final: 8.0.5"
  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: "empty named array support"
  11. type changed to: "Bug"