Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
LOC Function Details
◄Summary► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
LOC(filenumber%)
Usage Notes
■ The LOC function cannot be used on ISAM tables, or the SCRN, KYBD,
or LPTn devices.
■ For a COM device, LOC returns the number of characters in the input
queue waiting to be read. The value returned depends on whether the
device was opened in ASCII or binary mode.
■ In ASCII mode, the low-level routines stop queuing characters as soon
as an end of file is received. The end of file itself is not queued and
cannot be read. If you attempt to read the end of file, Visual Basic
generates the error message, "Input past end of file."
■ In binary mode, the end-of-file character is ignored and the entire
file can be read. The last byte read or written is returned.
■ For random-access files, LOC returns the number of the last record
read from or written to the file.
■ For sequential files, LOC returns the current byte position in the
file, divided by 128.
■ For a PIPE device, LOC returns 1 if any data is available in the
PIPE queue.