diff options
Diffstat (limited to 'doc/proc.n')
-rw-r--r-- | doc/proc.n | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -5,7 +5,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: proc.n,v 1.8 2007/12/13 15:22:33 dgp Exp $ +'\" RCS: @(#) $Id: proc.n,v 1.9 2008/01/16 14:27:43 msofer Exp $ '\" .so man.macros .TH proc n "" Tcl "Tcl Built-In Commands" @@ -41,6 +41,7 @@ When \fIname\fR is invoked a local variable will be created for each of the formal arguments to the procedure; its value will be the value of corresponding argument in the invoking command or the argument's default value. +Actual arguments are assigned to formal arguments strictly in order. Arguments with default values need not be specified in a procedure invocation. However, there must be enough actual arguments for all the @@ -57,10 +58,8 @@ When \fIbody\fR is being executed, variable names normally refer to local variables, which are created automatically when referenced and deleted when the procedure returns. One local variable is automatically created for each of the procedure's arguments. -Global variables can only be accessed by invoking -the \fBglobal\fR command or the \fBupvar\fR command. -Namespace variables can only be accessed by invoking -the \fBvariable\fR command or the \fBupvar\fR command. +Other variables can only be accessed by invoking one of the \fBglobal\fR, +\fBvariable\fR, \fBupvar\fR or \fBnamespace upvar\fR commands. .PP The \fBproc\fR command returns an empty string. When a procedure is invoked, the procedure's return value is the value specified in a |