summaryrefslogtreecommitdiffstats
path: root/doc/gets.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-27 12:53:22 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-27 12:53:22 (GMT)
commit4c2d0f20bfa9108949678cf49bfdc58eedc7bb93 (patch)
treeb3ce80d2f183dc1bd02185c2bf44738b4377c9ed /doc/gets.n
parentcd7e7ec95e76bcb5bf66d7cc9e6d60aad70dba07 (diff)
downloadtcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.zip
tcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.tar.gz
tcl-4c2d0f20bfa9108949678cf49bfdc58eedc7bb93.tar.bz2
More minor doc fixes
Diffstat (limited to 'doc/gets.n')
-rw-r--r--doc/gets.n7
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/gets.n b/doc/gets.n
index 8631e4b..2682c98 100644
--- a/doc/gets.n
+++ b/doc/gets.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: gets.n,v 1.5 2004/04/16 10:28:55 dkf Exp $
+'\" RCS: @(#) $Id: gets.n,v 1.6 2004/10/27 12:53:22 dkf Exp $
'\"
.so man.macros
.TH gets n 7.5 Tcl "Tcl Built-In Commands"
@@ -51,15 +51,14 @@ produce the same results as if there were an input line consisting
only of the end-of-line character(s).
The \fBeof\fR and \fBfblocked\fR commands can be used to distinguish
these three cases.
-
.SH "EXAMPLE"
This example reads a file one line at a time and prints it out with
the current line number attached to the start of each line.
-
+.PP
.CS
set chan [open "some.file.txt"]
set lineNumber 0
-while {[gets $chan line] >= 0} {
+while {[\fBgets\fR $chan line] >= 0} {
puts "[incr lineNumber]: $line"
}
close $chan