diff options
Diffstat (limited to 'doc/proc.n')
-rw-r--r-- | doc/proc.n | 8 |
1 files changed, 4 insertions, 4 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.10 2008/01/17 00:56:49 msofer Exp $ +'\" RCS: @(#) $Id: proc.n,v 1.11 2008/10/17 10:22:25 dkf Exp $ '\" .so man.macros .TH proc n "" Tcl "Tcl Built-In Commands" @@ -16,7 +16,6 @@ proc \- Create a Tcl procedure .SH SYNOPSIS \fBproc \fIname args body\fR .BE - .SH DESCRIPTION .PP The \fBproc\fR command creates a new Tcl procedure named @@ -76,8 +75,10 @@ executed in the procedure's body. If an error occurs while executing the procedure body, then the procedure-as-a-whole will return that same error. .SH EXAMPLES +.PP This is a procedure that accepts arbitrarily many arguments and prints them out, one by one. +.PP .CS \fBproc\fR printArguments args { foreach arg $args { @@ -89,15 +90,14 @@ them out, one by one. This procedure is a bit like the \fBincr\fR command, except it multiplies the contents of the named variable by the value, which defaults to \fB2\fR: +.PP .CS \fBproc\fR mult {varName {multiplier 2}} { upvar 1 $varName var set var [expr {$var * $multiplier}] } .CE - .SH "SEE ALSO" info(n), unknown(n) - .SH KEYWORDS argument, procedure |