summaryrefslogtreecommitdiffstats
path: root/doc/tell.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tell.n')
-rw-r--r--doc/tell.n7
1 files changed, 3 insertions, 4 deletions
diff --git a/doc/tell.n b/doc/tell.n
index a25b111..c62b22a 100644
--- a/doc/tell.n
+++ b/doc/tell.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: tell.n,v 1.9 2005/05/10 18:34:03 kennykb Exp $
+'\" RCS: @(#) $Id: tell.n,v 1.10 2008/10/17 10:22:25 dkf Exp $
'\"
.so man.macros
.TH tell n 8.1 Tcl "Tcl Built-In Commands"
@@ -16,7 +16,6 @@ tell \- Return current access position for an open channel
.SH SYNOPSIS
\fBtell \fIchannelId\fR
.BE
-
.SH DESCRIPTION
.PP
Returns an integer string giving the current access position in
@@ -31,7 +30,9 @@ 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.
.SH EXAMPLE
+.PP
Read a line from a file channel only if it starts with \fBfoobar\fR:
+.PP
.CS
# Save the offset in case we need to undo the read...
set offset [\fBtell\fR $chan]
@@ -43,9 +44,7 @@ if {[read $chan 6] eq "foobar"} {
seek $chan $offset
}
.CE
-
.SH "SEE ALSO"
file(n), open(n), close(n), gets(n), seek(n), Tcl_StandardChannels(3)
-
.SH KEYWORDS
access position, channel, seeking