1mNAME0m
       seek - Change the access position for an open channel

1mSYNOPSIS0m
       1mseek 4m22mchannelId24m 4moffset24m ?4morigin24m?


1mDESCRIPTION0m
       Changes the current access position for 4mchannelId24m.  4mChannelId24m must be a
       channel identifier such as returned from a previous invocation of  1mopen0m
       or  1msocket22m.   The  4moffset24m  and 4morigin24m arguments specify the position at
       which the next read or write will occur for 4mchannelId24m. 4mOffset24m  must  be
       an  integer  (which may be negative) and 4morigin24m must be one of the fol-
       lowing:

       1mstart     22mThe new access position will be 4moffset24m bytes from  the  start
                 of the underlying file or device.

       1mcurrent   22mThe new access position will be 4moffset24m bytes from the current
                 access position; a negative 4moffset24m moves the access  position
                 backwards in the underlying file or device.

       1mend       22mThe  new access position will be 4moffset24m bytes from the end of
                 the file or device.  A  negative  4moffset24m  places  the  access
                 position before the end of file, and a positive 4moffset24m places
                 the access position after the end of file.

       The 4morigin24m argument defaults to 1mstart22m.

       The command flushes all buffered output for the channel before the com-
       mand returns, even if the channel is in nonblocking mode.  It also dis-
       cards any buffered and unread input.  This  command  returns  an  empty
       string.   An  error occurs if this command is applied to channels whose
       underlying file or device does not support seeking.

       Note that 4moffset24m values are byte offsets, not character offsets.   Both
       1mseek 22mand 1mtell 22moperate in terms of bytes, not characters, unlike 1mread22m.


1mSEE ALSO0m
       file(n), open(n), close(n), gets(n), tell(n)


1mKEYWORDS0m
