diff options
author | dgp <dgp@users.sourceforge.net> | 2004-03-16 22:19:41 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2004-03-16 22:19:41 (GMT) |
commit | 7f955ebb347697e3262c2bf5469bd7552e4bda57 (patch) | |
tree | 6090cd73ac967c3e7e605d21c19e7e83ae2d63c5 /doc/return.n | |
parent | 25dabc3b3448e17e9f8350b49ffc80346888cba9 (diff) | |
download | tcl-7f955ebb347697e3262c2bf5469bd7552e4bda57.zip tcl-7f955ebb347697e3262c2bf5469bd7552e4bda57.tar.gz tcl-7f955ebb347697e3262c2bf5469bd7552e4bda57.tar.bz2 |
* doc/catch.n: Compiled [catch] no longer fails to catch syntax
errors. Removed the claims in the documentation that it does.
* doc/return.n: Updated example to use [dict merge].
Diffstat (limited to 'doc/return.n')
-rw-r--r-- | doc/return.n | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/return.n b/doc/return.n index 55ddf96..58c4bd1 100644 --- a/doc/return.n +++ b/doc/return.n @@ -6,7 +6,7 @@ '\" See the file "license.terms" for information on usage and redistribution '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES. '\" -'\" RCS: @(#) $Id: return.n,v 1.8 2003/09/03 16:24:31 dgp Exp $ +'\" RCS: @(#) $Id: return.n,v 1.9 2004/03/16 22:19:43 dgp Exp $ '\" .so man.macros .TH return n 8.5 Tcl "Tcl Built-In Commands" @@ -140,7 +140,7 @@ The \fB-level\fR and \fB-code\fR options work together to set the return code to be returned by one of the commands currently being evaluated. The \fIlevel\fR value must be a non-negative integer representing a number of levels on the call stack. It defines the number of levels up the stack -at which the return code of command currently being evaluated should +at which the return code of a command currently being evaluated should be \fIcode\fR. If no \fB-level\fR option is provided, the default value of \fIlevel\fR is 1, so that \fBreturn\fR sets the return code that the current procedure returns to its caller, 1 level up the call stack. The @@ -298,8 +298,7 @@ proc myReturn {args} { set result [lindex $args end] set args [lrange $args 0 end-1] } - set options [eval \\ - [list dict create -level 1] $args] + set options [dict merge {-level 1} $args] dict incr options -level return -options $options $result } |