From d2345775974324ce25f617209a264d6e64b57cd6 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Thu, 17 Jan 2008 00:56:49 +0000 Subject: better wording for arg handling in proc.n (tclguy) --- doc/proc.n | 13 ++++++++++--- 1 file 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 -- cgit v0.12