|
  QuickSCREEN       Details       Example       Contents       Index |
| ÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ |
| LOC Function Details |
|
| Syntax |
|   LOC(filenumber) |
|   |
| The filenumber is the number used in the OPEN statement to open the |
| file. With random-access files, the LOC function returns the number |
| of the last record read from or written to the file. With sequential |
| files, LOC returns the current byte position in the file, divided by |
| 128. With binary mode files, LOC returns the position of the last byte |
| read or written. |
|   |
| For a COM device, LOC(filenumber) 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 end-of-file |
| is received. The end-of-file itself is not queued and cannot be read. |
| An attempt to read the end-of-file produces an error message that |
| reads "Input past end of file." In binary mode, the end-of-file |
| character is ignored and the entire file can be read. |
|   |
| The LOC function cannot be used on the SCRN:, KYBD:, or LPTn: devices. |