summaryrefslogtreecommitdiffstats
path: root/doc/catch.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-11-09 10:02:16 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-11-09 10:02:16 (GMT)
commite9924b615586815564a5e7e3cc42a5bb30277fe1 (patch)
treeb2c3b4c492ec3547cbf9521695189d3993743b0f /doc/catch.n
parent6d92e7af9040196d032f8a0f814eb7b6b429678a (diff)
downloadtcl-e9924b615586815564a5e7e3cc42a5bb30277fe1.zip
tcl-e9924b615586815564a5e7e3cc42a5bb30277fe1.tar.gz
tcl-e9924b615586815564a5e7e3cc42a5bb30277fe1.tar.bz2
Minor formatting changes and clarifications
Diffstat (limited to 'doc/catch.n')
-rw-r--r--doc/catch.n11
1 files changed, 5 insertions, 6 deletions
diff --git a/doc/catch.n b/doc/catch.n
index 54eb35c..4b346cb 100644
--- a/doc/catch.n
+++ b/doc/catch.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: catch.n,v 1.12 2004/10/27 09:36:58 dkf Exp $
+'\" RCS: @(#) $Id: catch.n,v 1.13 2004/11/09 10:02:16 dkf Exp $
'\"
.so man.macros
.TH catch n "8.5" Tcl "Tcl Built-In Commands"
@@ -40,11 +40,11 @@ have return codes other than the five defined by Tcl.
.PP
If the \fIresultVarName\fR argument is given, then the variable it names is
set to the result of the script evaluation. When the return code from
-the script is \fBTCL_ERROR\fR, the value stored in \fIresultVarName\fR is an error
-message. When the return code from the script is \fBTCL_OK\fR, the value
+the script is 1 (\fBTCL_ERROR\fR), the value stored in \fIresultVarName\fR is an error
+message. When the return code from the script is 0 (\fBTCL_OK\fR), the value
stored in \fIresultVarName\fR is the value returned from \fIscript\fR.
-.VS 8.5
.PP
+.VS 8.5
If the \fIoptionsVarName\fR argument is given, then the variable it
names is set to a dictionary of return options returned by evaluation
of \fIscript\fR. Tcl specifies two entries that are always
@@ -78,7 +78,6 @@ dictionary of return options, and the \fBreturn\fR command may be
used by scripts to set return options in addition to those defined
above.
.VE 8.5
-
.SH EXAMPLES
The \fBcatch\fR command may be used in an \fBif\fR to branch based on
the success of a script.
@@ -88,7 +87,7 @@ if { [\fBcatch\fR {open $someFile w} fid] } {
exit 1
}
.CE
-
+.PP
There are more complex examples of \fBcatch\fR usage in the
documentation for the \fBreturn\fR command.