Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8ae37f9f6e1d5df63b4151b080feaf48b2b8e1bd
Ticket: 50f67a3acef090c734090bb894ca42445b2f3d0c
INST_START_CMD bug?
User & Date: msofer on 2014-11-27 20:02:24
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    There seems to be a problem with commands redefining themselves in their own arguments. Consider the script
    
    <verbatim>
      mig@MTP:~/DEVEL/tcl-core/trunk/unix$ cat TT 
      proc history args {}
      set x [proc set args {puts FOO}]42
      puts $x
    </verbatim>
    
    There are 3 ways in which we can run this: './tclsh TT', 'source TT', or typing it directly at the command line. The first works properly: the command [set] is replaced *before* it is used, the variable x is never set.
    
    The third variant, typing it at the command line, misbehaves since ... forever? Doing this sets the variable x to 42, the command [set] is redefined *after* it is used.
    
    The second variant used to work properly until [42090a4d6], where it started replacing after use.
    
  5. foundin changed to: "8.6.3"
  6. is_private changed to: "0"
  7. login: "msofer"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "214bb5765a5d2d4513fe393de9e8c8431e3e869a"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "msofer"
  14. subsystem changed to: "47. Bytecode Compiler"
  15. title changed to: "INST_START_CMD bug?"
  16. type changed to: "Bug"