Portability Functions: Return the current position of a file.
result = GETPOS (lunit)
result = GETPOSI8 (lunit)
(Input) INTEGER(4). External unit number of a file. The value must be in the range 0 to 100 and the file must be connected.
The result type is INTEGER(4) for GETPOS; INTEGER(8) for GETPOSI8. The result is the offset, in bytes, from the beginning of the file. If an error occurs, the result value is -1 and the following error code is returned in
EINVAL: lunit is not a valid unit number, or is not open.
These functions are equivalent to FTELL, FTELLI8.