Skip to content
Tcl Source Code History Of Ticket 1065452
Login

History Of Ticket 1065452

Artifacts Associated With Ticket 1065452

  1. Ticket change [0fcb90c748] (rid 94855) by nobody on 2004-11-12 21:34:31:

    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 [ead6582555] (rid 103433) by dgp on 2004-11-13 06:05:51:

    1. assignee changed to: "davygrvy"
    2. closedate changed to: "2004-11-12T23:05:51"
    3. closer changed to: "dgp"
    4. icomment:
      Logged In: YES 
      user_id=80530
      
      Duplicate of 1065440
      
      
    5. login: "dgp"
    6. mimetype: "text/plain"
    7. resolution changed to: "Duplicate"
    8. status changed to: "Closed"
    9. username: "dgp"