.TELL - determine current read/write location as integer.

Alternative Entries: .TELLB, FTELL, _FTELL

Usage:

B:
   loc = .tell( unit );
/* C users see "expl c lib ftell" */

Where:

unit
is the unit whose current read/write location you wish to determine.
loc
is the current read/write location, expressed as a seek integer.

Description:

.TELL determines the current read/write location, expressed as a seek integer.

If you specified the "zb" option when you opened the unit, the seek integer tells the character offset from the beginning of the file.

If you did not specify "zb" when you opened the file, the upper 14 bits of the seek integer tell the logical block and the lower 22 bits tell the character offset within the block.

Notes:

Some GCOS8 files are too large for seek integers to be able to address every location in the file. Thus you may be better off to use the library functions .FSPOS and .FGPOS which address locations using "seek structures" instead of seek integers. Seek structures offer a much larger range of addressing.

The .TELL function will not work on concatenated input file lists, i.e. lists of the form "file1+file2+file3".

The .TELL function is now supported on strings that have been opened for I/O.

See Also:

expl b lib .seek
to change to a new file position using seek integers.
expl b lib .fgpos
to determine the current read/write location as a seek structure.
expl b lib open
to open files with the "zb" option.

Copyright © 2000, Thinkage Ltd.