Seek filenumber%, position%, origin%

Seek moves the file pointer to a specified location. 

  • position% parameter specifies the number of bytes from initial position 
  • origin% specifies the initial position if is assumes one of the following values: 
    • 0 – Current position 
    • 1 – End of file 
    • 2 – Beginning of file
Operation state and errors can be detected using FError(filenumber%) function. 
FTell(filenumber%) function can be used to get the current position of a file pointer. 
If no error has occurred on file, FTell returns the position (it is a integer number >= 0). 
If filenumber% is invalid, FTell sets errno to 22 and returns -1.