home *** CD-ROM | disk | FTP | other *** search
/ Power CD-ROM!! 7 / POWERCD7.ISO / prgmming / clipper / ftell.prg < prev    next >
Text File  |  1993-10-14  |  1KB  |  54 lines

  1. /*
  2.  * File......: FTELL.PRG
  3.  * Author....: Dave Pearson
  4.  * BBS.......: The Dark Knight Returns
  5.  * Net/Node..: 050/069
  6.  * User Name.: Dave Pearson
  7.  * Date......: 13/04/93
  8.  * Revision..: 1.0
  9.  *
  10.  * This is an original work by Dave Pearson and is placed in the public
  11.  * domain.
  12.  *
  13.  * Modification history:
  14.  * ---------------------
  15.  *
  16.  * $Log$
  17.  *
  18.  */
  19.  
  20. #include "gt_lib.ch"
  21.  
  22. /*  $DOC$
  23.  *  $FUNCNAME$
  24.  *      GT_FTELL()
  25.  *  $CATEGORY$
  26.  *      File I/O
  27.  *  $ONELINER$
  28.  *      Return the location of the file pointer in a low level file.
  29.  *  $SYNTAX$
  30.  *      GT_FTell(<nFileHandle>) --> nBytePosition
  31.  *  $ARGUMENTS$
  32.  *      <nFileHandle> is the handle of a file that has been opened or
  33.  *      created with one of Clipper's low level file functions.
  34.  *  $RETURNS$
  35.  *      The byte position of the file pointer.
  36.  *  $DESCRIPTION$
  37.  *      GT_FTell() can be used for finding the location or a file
  38.  *      pointer when working with files opened or created with Clipper's
  39.  *      low level file functions.
  40.  *  $EXAMPLES$
  41.  *      // Print the location of the file pointer.
  42.  *
  43.  *      local nFile := fopen("LIFE.42")
  44.  *      fseek(nFile,41)
  45.  *      ? GT_FTell(nFile)     // Print the location in the file.
  46.  *      fclose(nFile)
  47.  *  $SEEALSO$
  48.  *      GT_FSIZE() GT_FLOCATE()
  49.  *  $END$
  50.  */
  51.  
  52. function GT_FTell(nFileHandle)
  53. return(fseek(nFileHandle,0,FS_RELATIVE))
  54.