Skip to main content

LOC function (LotusScript Language)

Returns the current position of the file pointer in a file.

Syntax

LOC ( fileNumber )

Elements

fileNumber

The number assigned to the file when you opened it.

Return value

The following table presents the LOC return values for random, sequential, and binary files.

File typeReturn value
RandomThe number of the last record read from or written to the file. This is the file pointer position, minus 1.
SequentialThe byte position in the file, divided by 128 and truncated to an integer.
BinaryThe position of the last byte read from or written to the file. This is the file pointer position, minus 1.

Example