Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 7171e2915dd7728897830047dadf935b4a8f494b
Ticket: 218503ffffffffffffffffffffffffffffffffff
double substitution in expr: incompatibility in Tcl 8.0.3 (w
User & Date: nobody on 2000-10-26 01:01:24
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 732 Bug
    Version: 8.0.3
    SubmitDate: '1998-10-13'
    LastModified: '1999-08-18'
    Severity: SER
    Status: Released
    Submitter: admin
    ChangedBy: hobbs
    OS: All
    OSVersion: NA
    Machine: NA
    FixedDate: '1999-08-13'
    FixedInVersion: 8.1
    ClosedDate: '2000-10-25'
    
    
    This must have something to do with a special case within the byte
    
    code compiler, I'm guessing.  Here is a fix in the style of 8.1 where
    
    little or no attempt is made at guessing whether double substitution
    
    can be avoided.  This will slow down "naked" expressions with variable
    
    substitutions, but so will 8.1, and they should be brace quoted in
    
    almost every case.
    
    
    
    Index: generic/tclCompile.c
    
    ===================================================================
    
    retrieving revision 1.1.1.1.2.2
    
    diff -u -2 -r1.1.1.1.2.2 tclCompile.c
    
    --- tclCompile.c        1998/09/03 17:04:08     1.1.1.1.2.2
    
    +++ tclCompile.c        1998/09/15 21:28:20
    
    @@ -3879,5 +3879,5 @@
    
         /*
    
          * Scan the concatenated expression's characters looking for any
    
    -     * '['s or (for now) '\'s. If any are found, just call the expr cmd
    
    +     * '['s or '\'s or '$'s. If any are found, just call the expr cmd
    
          * at runtime.
    
          */
    
    @@ -3888,5 +3888,5 @@
    
         for (p = first;  p <= last;  p++) {
    
            c = *p;
    
    -       if ((c == '[') || (c == '\\')) {
    
    +       if ((c == '[') || (c == '\\') || (c == '$')) {
    
                inlineCode = 0;
    
                break;
    
    
    
    This bug was fixed in or before 8.1. 
    -- 08/13/1999 hobbs
    To clarify, this was fixed in 8.0.5, but not 8.1-8.2.0 as it
    slipped by in the parallel development and no test case was
    provided.  This has been fixed for 8.2.1/8.3 and there are now
    test cases for it. 
    -- 08/18/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: "10. Objects"
  10. title changed to:
    double substitution in expr: incompatibility in Tcl 8.0.3 (w
    
  11. type changed to: "Bug"