summaryrefslogtreecommitdiffstats
path: root/doc/close.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/close.n')
-rw-r--r--doc/close.n6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/close.n b/doc/close.n
index bc5fa86..800ee8a 100644
--- a/doc/close.n
+++ b/doc/close.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: close.n,v 1.13 2007/12/13 15:22:32 dgp Exp $
+'\" RCS: @(#) $Id: close.n,v 1.14 2008/10/17 10:22:25 dkf Exp $
'\"
.so man.macros
.TH close n 7.5 Tcl "Tcl Built-In Commands"
@@ -57,9 +57,11 @@ an error occurs while flushing output. If a command in a command
pipeline created with \fBopen\fR returns an error, \fBclose\fR
generates an error (similar to the \fBexec\fR command.)
.SH EXAMPLE
+.PP
This illustrates how you can use Tcl to ensure that files get closed
even when errors happen by combining \fBcatch\fR, \fBclose\fR and
\fBreturn\fR:
+.PP
.CS
proc withOpenFile {filename channelVar script} {
upvar 1 $channelVar chan
@@ -71,9 +73,7 @@ proc withOpenFile {filename channelVar script} {
return -options $options $result
}
.CE
-
.SH "SEE ALSO"
file(n), open(n), socket(n), eof(n), Tcl_StandardChannels(3)
-
.SH KEYWORDS
blocking, channel, close, nonblocking