summaryrefslogtreecommitdiffstats
path: root/doc/tell.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/tell.n')
-rw-r--r--doc/tell.n5
1 files changed, 2 insertions, 3 deletions
diff --git a/doc/tell.n b/doc/tell.n
index c3f8db8..e8bf3af 100644
--- a/doc/tell.n
+++ b/doc/tell.n
@@ -14,7 +14,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
@@ -29,7 +28,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]
@@ -41,9 +42,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