Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide To Clipper - <b>fseek()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FSEEK()


Syntax:     FSEEK(<expN1>, <expN2> [,<expN3>])

Purpose:    To set the DOS file pointer to a new position.

Arguments:  <expN1> is the file handle obtained from FOPEN(),
            FCREATE(), or predefined by DOS.

            <expN2> is the number of bytes to move the file pointer
            from the position as defined by <expN3>.  This can be a
            positive or negative number depending on the direction to
            move the pointer.

            <expN3> defines the method of moving and is indicated by
            a value from the following list:

            Table: Methods of Moving the DOS File Pointer
            -----------------------------------------------------
            Method      Description
            -----------------------------------------------------
            0           From beginning-of-file
            1           From the current pointer position
            2           From end-of-file
            -----------------------------------------------------

            The default method is zero.

Returns:    A numeric value.

            FSEEK() returns the new position of the file pointer
            relative to the beginning-of-file (position 0) regardless of
            the moving method.

Library:    EXTEND.LIB

            Warning: These functions allow low level access to DOS
            files and devices.  They should be used with extreme care
            and require a thorough knowledge of the operating system.


----------------------------------- Example --------------------------------

   handle = FOPEN("Temp.txt")
   *
   * Get length of the file.
   length = FSEEK(handle, 0, 2)
   *
   * Reset file position to beginning-of-file.
   FSEEK(handle, 0)




See Also: FERROR() FREAD() FREADSTR() FWRITE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson