The PB site (http://www.powerbasic.com/support/help/pbcc/seek_statement.htm) says
Use the SEEK function to determine a binary file's current pointer position, and LOF to determine its length, and they discourage Loc as obsolete (http://www.powerbasic.com/support/help/pbcc/loc_function.htm).
First, I don't get how one should use Seek to get the pointer without moving it; and second, what's wrong with Loc?
The next update of MasmBasic will have Loc (as shown below), but I am curious to know why PB doesn't like it...
Quote Open "O", #1, "TestShort.txt" ; open file for output
Print #1, "This is a pretty long string"
Close
Open "U", #1, "TestShort.txt" ; open file for updating
Print Str$("The file has %i bytes\n", Lof(#1))
Seek #1, 17 ; move file pointer on long
Print Str$("The file pointer is now at byte %i\n", Loc(#1))
Print #1, "short string" ; result: This is a pretty short string
Print Str$("Now the file has %i bytes\n", Lof(#1))
Close
Print "The result: [", FileRead$("TestShort.txt"), "]"