result = loc(deviceID)
This function returns one of two things, depending on the value of
deviceID is the file ID number of an open file, the function returns the current location of the file mark as an offset from the beginning of the current record. For example, if
loc(fileID) returns zero, the file mark is located at the beginning of the record. The file mark indicates where in the file the next input or output operation will occur.
deviceID specifies an open serial port (i.e., if its value is
_printerPort), then the function indicates the status of the carrier signal. If returns
_zTrue if the carrier is detected, or
_false if the carrier is not detected.
You can use
loc along with
rec to determine the exact location of the file mark within the file.
rec; record; open; lof; HandShake; open "C"