Skip to content
Tcl Source Code History Of Ticket 1367486
Login

History Of Ticket 1367486

Artifacts Associated With Ticket 1367486

  1. Ticket change [d176232f65] (rid 113353) by nobody on 2005-11-27 12:08:44:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      use an alias for undefined procedure
      ---
      (bin) 1 % interp alias {} xxx {} xx
      xxx
      (bin) 2 % xx
      too many nested evaluations (infinite loop?)
      (bin) 3 % xxx
      too many nested evaluations (infinite loop?)
      ---
      but
      ---
      (bin) 1 % interp alias {} xxx {} yy
      xxx
      (bin) 2 % yy
      invalid command name "yy"
      (bin) 3 % xxx
      invalid command name "yy"
      ---
      
      (bin) 4 % info patchlevel
      8.4.11
      (bin) 5 % parray tcl_platform
      tcl_platform(byteOrder) = littleEndian
      tcl_platform(machine)   = intel
      tcl_platform(os)        = Windows NT
      tcl_platform(osVersion) = 5.1
      tcl_platform(platform)  = windows
      tcl_platform(user)      = oleinickoa
      tcl_platform(wordSize)  = 4
      
      
    4. foundin initialized to: "obsolete: 8.4.11"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "20. [interp]"
    10. title initialized to: "Unexpected error when aliasing undefined command"
    11. type initialized to: "Bug"
  2. Ticket change [725670686c] (rid 100838) by msofer on 2005-11-27 19:37:40:

    1. assignee changed to: "msofer"
    2. closedate changed to: "2005-11-27T12:37:40"
    3. closer changed to: "msofer"
    4. icomment:
      Logged In: YES 
      user_id=148712
      
      This is not really a bug, and [interp alias] has nothing to
      do with it. It is the autocompletion in the interactive
      tclsh playing tricks on you. Look at the following session:
      
        % interp alias {} xxx {} xx
        xxx
        % xx
        too many nested evaluations (infinite loop?)
        % proc xxAHA! {} {}
        % xx
        ambiguous command name "xx": xxAHA! xxx
      
      What is happening in your case is:
        (1) you invoke a command named xx (directly)
        (2) no such command; autocompletion sees that there is a
      unique command (xxx) starting with xx, and invokes it
        (3) xxx invokes xx: goto 1.
      
      Note also that you see the correct error if the script is
      sourced from a file, as the autocompletion does not work in
      that case:
      
      mig@uhu:~$ cat /tmp/test
      interp alias {} xxx {} xx
      xx
      mig@uhu:~$ tclsh /tmp/test
      invalid command name "xx"
          while executing
      "xx"
          (file "/tmp/test" line 2)
      
      
      
    5. login: "msofer"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Closed"
    9. username: "msofer"