To return the length (number of bytes) allocated to the file.
LOF(file number)
file number is the number of the file that the file was opened under.
With communications files, LOF returns the amount of free space in the input buffers.
The following sequence gets the last record of the random-access file file.big, and assumes that the file was created with a default record length of 128 bytes:
10 OPEN "R",1,"FILE.BIG" 20 GET #1,LOF(1)/128 . . .