File Position

Returns the current position in the file


pos = File Position (fileId)


As data is read from or written to a file there is a pointer inside the file which keeps track of how far through the file it has got. This command simply returns the position of this pointer.

fileId is the id of the file obtained from Ask Open File or Open File.

pos is the current position in the file. If the file is not open or fileId is invalid then this will cause an error. Position is different depending on the data format of the file.

Data File
The position indicates the amount of data that has been stored. Integers and floats are both 4 pieces of data long. A string is the length of the stored string plus 1.

Text File
The position indicates which line of the text file to access. Each piece of data should be stored on a separate line.

Table of contents