summaryrefslogtreecommitdiffstats
path: root/doc/close.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2008-10-17 10:22:24 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2008-10-17 10:22:24 (GMT)
commit842e3ff91428c72a2ce0d4df4889778af82f4b12 (patch)
tree5a94240e321022019f593f6bd712833ab12138c6 /doc/close.n
parent8b464633a0f2df93912ad25af65a5724cd643da2 (diff)
downloadtcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.zip
tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.gz
tcl-842e3ff91428c72a2ce0d4df4889778af82f4b12.tar.bz2
Improve clarity of formatting.
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