home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tcl2-73c.zip / tcl7.3 / doc / seek.n < prev    next >
Text File  |  1993-06-07  |  3KB  |  65 lines

  1. '\"
  2. '\" Copyright (c) 1993 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/tcl/man/RCS/seek.n,v 1.1 93/06/07 16:48:27 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS seek tcl
  25. .BS
  26. '\" Note:  do not modify the .SH NAME line immediately below!
  27. .SH NAME
  28. seek \- Change the access position for an open file
  29. .SH SYNOPSIS
  30. \fBseek \fIfileId offset \fR?\fIorigin\fR?
  31. .BE
  32.  
  33. .SH DESCRIPTION
  34. .PP
  35. Change the current access position for \fIfileId\fR.
  36. \fIFileId\fR must have been the return
  37. value from a previous call to \fBopen\fR, or it may be \fBstdin\fR,
  38. \fBstdout\fR, or \fBstderr\fR to refer to one of the standard I/O
  39. channels.
  40. The \fIoffset\fR and \fIorigin\fR arguments specify the position at
  41. which the next read or write will occur for \fIfileId\fR.
  42. \fIOffset\fR must be an integer (which may be negative) and \fIorigin\fR
  43. must be one of the following:
  44. .TP
  45. \fBstart\fR
  46. The new access position will be \fIoffset\fR bytes from the start
  47. of the file.
  48. .TP
  49. \fBcurrent\fR
  50. The new access position will be \fIoffset\fR bytes from the current
  51. access position; a negative \fIoffset\fR moves the access position
  52. backwards in the file.
  53. .TP
  54. \fBend\fR
  55. The new access position will be \fIoffset\fR bytes from the end of
  56. the file.  A negative \fIoffset\fR places the access position before
  57. the end-of-file, and a positive \fIoffset\fR places the access position
  58. after the end-of-file.
  59. .LP
  60. The \fIorigin\fR argument defaults to \fBstart\fR.
  61. This command returns an empty string.
  62.  
  63. .SH KEYWORDS
  64. access position, file, seek
  65.