tcl Procedure arguments A procedure that accepts two arguments


Example

proc myproc {alpha beta} {
    ...
    set foo $alpha
    set beta $bar     ;# note: possibly useless invocation
}

myproc 12 34          ;# alpha will be 12, beta will be 34

If the argument list consists of words, those will be the names of local variables in the procedure, and their initial values will be equal to the argument values on the command line. The arguments are passed by value and whatever happens to the variable values inside the procedure will not influence the state of data outside the procedure.