1mNAME0m
       tell - Return current access position for an open channel

1mSYNOPSIS0m
       1mtell 4m22mchannelId0m


1mDESCRIPTION0m
       Returns  an  integer string giving the current access position in 4mchan-0m
       4mnelId24m.  This value returned is a byte offset that can be passed to 1mseek0m
       in  order  to set the channel to a particular position.  Note that this
       value is in terms of  bytes,  not  characters  like  1mread22m.   The  value
       returned is -1 for channels that do not support seeking.

       4mChannelId24m must be an identifier for an open channel such as a Tcl stan-
       dard channel (1mstdin22m, 1mstdout22m, or 1mstderr22m), the return value from an invo-
       cation  of  1mopen 22mor 1msocket22m, or the result of a channel creation command
       provided by a Tcl extension.

1mEXAMPLE0m
       Read a line from a file channel only if it starts with 1mfoobar22m:
              # Save the offset in case we need to undo the read...
              set offset [1mtell 22m$chan]
              if {[read $chan 6] eq "foobar"} {
                  gets $chan line
              } else {
                  set line {}
                  # Undo the read...
                  seek $chan $offset
              }


1mSEE ALSO0m
       file(n), open(n), close(n), gets(n), seek(n), Tcl_StandardChannels(3)


1mKEYWORDS0m
