summaryrefslogtreecommitdiffstats
path: root/doc/eof.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-27 09:36:58 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-27 09:36:58 (GMT)
commitcd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07 (patch)
tree2f66883fc243d05145536a48036f61275d482016 /doc/eof.n
parentdfe0bb63c25ec4b9669b67071a6540448d5a7379 (diff)
downloadtcl-cd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07.zip
tcl-cd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07.tar.gz
tcl-cd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07.tar.bz2
Many minor doc fixes
Diffstat (limited to 'doc/eof.n')
-rw-r--r--doc/eof.n8
1 files changed, 3 insertions, 5 deletions
diff --git a/doc/eof.n b/doc/eof.n
index dca00c9..eed48cb 100644
--- a/doc/eof.n
+++ b/doc/eof.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: eof.n,v 1.5 2004/05/28 12:09:59 dkf Exp $
+'\" RCS: @(#) $Id: eof.n,v 1.6 2004/10/27 09:36:58 dkf Exp $
'\"
.so man.macros
.TH eof n 7.5 Tcl "Tcl Built-In Commands"
@@ -23,19 +23,17 @@ Returns 1 if an end of file condition occurred during the most
recent input operation on \fIchannelId\fR (such as \fBgets\fR),
0 otherwise.
.PP
-.VS
\fIChannelId\fR must be an identifier for an open channel such as a
Tcl standard channel (\fBstdin\fR, \fBstdout\fR, or \fBstderr\fR),
the return value from an invocation of \fBopen\fR or \fBsocket\fR, or
the result of a channel creation command provided by a Tcl extension.
-.VE
.SH EXAMPLES
Read and print out the contents of a file line-by-line:
.CS
set f [open somefile.txt]
while {1} {
set line [gets $f]
- if {[eof $f]} {
+ if {[\fBeof\fR $f]} {
close $f
break
}
@@ -50,7 +48,7 @@ fconfigure $f -translation binary
set recordSize 40
while {1} {
set record [read $f $recordSize]
- if {[eof $f]} {
+ if {[\fBeof\fR $f]} {
close $f
break
}