FilePos
Usage:
FilePos(Handle)
Description:
The FilePos returns the current position in the file for read/write operations. The value returned is an offset, starting from 0 (the beginning of the file). The file position is changed by the SeekFile command, or by file read/write commands.
The Handle parameter is the file handle returned by ReadFile, WriteFile or OpenFile.
Example:
Function Main()
F = OpenFile("Test.txt")
// Read in current first line and display to user
FileData = ReadLine(F)
Output(Actor(), FileData)
// Return to the beginning of the file and write a new line
SeekFile(F, 0)
WriteLine(F, "This text will be readable in Notepad")
CloseFile(F)
Return()
End Function
Comments (0)
You don't have permission to comment on this page.