summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-01-17 00:56:49 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-01-17 00:56:49 (GMT)
commitd2345775974324ce25f617209a264d6e64b57cd6 (patch)
treed88147aec1ef64916397269991a1c284eefd1f68 /doc
parent49eca9a7a4e39d17536afa4222fca7a529988b80 (diff)
downloadtcl-d2345775974324ce25f617209a264d6e64b57cd6.zip
tcl-d2345775974324ce25f617209a264d6e64b57cd6.tar.gz
tcl-d2345775974324ce25f617209a264d6e64b57cd6.tar.bz2
better wording for arg handling in proc.n (tclguy)
Diffstat (limited to 'doc')
-rw-r--r--doc/proc.n13
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/proc.n b/doc/proc.n
index 6bccf28..30b8bba 100644
--- a/doc/proc.n
+++ b/doc/proc.n
@@ -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.9 2008/01/16 14:27:43 msofer Exp $
+'\" RCS: @(#) $Id: proc.n,v 1.10 2008/01/17 00:56:49 msofer Exp $
'\"
.so man.macros
.TH proc n "" Tcl "Tcl Built-In Commands"
@@ -35,7 +35,10 @@ elements specifies
one argument. Each argument specifier is also a list with either
one or two fields. If there is only a single field in the specifier
then it is the name of the argument; if there are two fields, then
-the first is the argument name and the second is its default value.
+the first is the argument name and the second is its default value.
+Arguments with default values that are followed by non-defaulted
+arguments become required arguments. In 8.6 this will be considered an
+error.
.PP
When \fIname\fR is invoked a local variable
will be created for each of the formal arguments to the procedure; its
@@ -46,7 +49,11 @@ Arguments with default values need not be
specified in a procedure invocation. However, there must be enough
actual arguments for all the
formal arguments that do not have defaults, and there must not be any extra
-actual arguments. There is one special case to permit procedures with
+actual arguments.
+Arguments with default values that are followed by non-defaulted
+arguments become required arguments (in 8.6 it will be considered an
+error).
+There is one special case to permit procedures with
variable numbers of arguments. If the last formal argument has the name
\fBargs\fR, then a call to the procedure may contain more actual arguments
than the procedure has formals. In this case, all of the actual arguments