qp.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
FilePos Function
  Summary Details Example                                   Back
 
  Argument
 
    file_variable    Open typed or untyped file
 
  Returns
 
    LongInt          Current file position
 
  Description
 
    The FilePos function returns the current position in an open
    nontext file. Numbering of positions in a file begins at 0 and
    continues through the positive integers. If the current position
    is at end-of-file, FilePos returns a value equal to the return
    value of FileSize. The next file operation is performed at the
    position returned by FilePos.
 
    FilePos applies to open typed or untyped files. It does not accept
    a text file variable. To use FilePos on a text file, declare
    file_variable as FILE OF Char and assign it to the text file.
 
    If file_variable is not associated with a file or if the file is
    not open when FilePos is called, an I/O error occurs.
 
    To prevent a program from halting with a run-time error when an I/O
    error occurs, turn off I/O checking with {$I-} and check the return
    value of the IOResult function.