Skip to content
Tcl Source Code History Of Ticket 1065440
Login

History Of Ticket 1065440

Artifacts Associated With Ticket 1065440

  1. Ticket change [11562835eb] (rid 95118) by nobody on 2004-11-12 21:18:13:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      per docs at 
      http://www.tcl.tk/man/tcl8.4/TclCmd/proc.htm
      
      it states: "If the last formal argument has the name 
      args, then a call to the procedure may contain more 
      actual arguments than the procedure has formals"
      
      This is a false statement if the proc is binded to a msg.  
      It only will work if it is "arg" not "args".  
      
      in a real example:
      
      bind msg -|- !test test
      
      proc test { nick host hand args } {
              
                  set myvar1 [lindex $args 0]
                  set myvar2 [lindex $args 1]
                  set myvar3 [lindex $args 2]
                  puthelp "PRIVMSG $nick :myvar1=$myvar1 
      myvar2=$myvar2 myvar3=$myvar3"
      }
      
      when attached to eggdrop, i receive this.
      
      [14:14] <nick> !test testing this script
      [14:14] <eggdrop> myvar1=testing this script myvar2= 
      myvar3=
      
      if i change the script to:
      
      bind msg -|- !test test
      
      proc test { nick host hand arg } {
              
                  set myvar1 [lindex $arg 0]
                  set myvar2 [lindex $arg 1]
                  set myvar3 [lindex $arg 2]
                  puthelp "PRIVMSG $nick :myvar1=$myvar1 
      myvar2=$myvar2 myvar3=$myvar3"
      }
      
      I receive this.
      
      [14:18] <nick> !test testing this script
      [14:18] <eggdrop> myvar1=testing myvar2=this 
      myvar3=script
      
      contact info [email protected]
      
    4. foundin initialized to: "obsolete: 8.4.7"
    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: "18. Commands M-Z"
    10. title initialized to: "proc - bind MSG - args - invalid."
    11. type initialized to: "Bug"
  2. Ticket change [0475974270] (rid 120004) by dgp on 2004-11-13 06:10:45:

    1. assignee changed to: "dgp"
    2. closedate changed to: "2004-11-12T23:10:45"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      
      this is very likely a bug/misfeature
      in eggdrop rather than in Tcl.
      
      If either you or the eggdrop authors
      can point with greater specificity
      to an error in Tcl's public interface,
      we can look into it, but without that
      it's prudent to assume that the eggdrop
      application is where your problems lie.
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Invalid"
    8. status changed to: "Closed"
    9. subsystem changed to: "22. [proc] and [uplevel]"
    10. username: "dgp"