Syntax |
Loc(filenumber) |
|
Description |
Returns a Long representing the position of the file pointer in the given file. |
|
Comments |
The filenumber parameter is an Integer used by the Basic Control Engine to refer to the number passed by the Open statement to the Basic Control Engine . The Loc function returns different values depending on the mode in which the file was opened: |
|
|
File Mode |
Returns |
|
Input |
Current byte position divided by 128. |
|
Output |
Current byte position divided by 128. |
|
Append |
Current byte position divided by 128. |
|
Binary |
Position of the last byte read or written. |
|
Random |
Number of the last record read or written. |
Example |
This example reads 5 lines of the autoexec.bat file, determines the current location of the file pointer, and displays it in a dialog box. Const crlf = Chr$(13) + Chr$(10) Sub Main() |
|
See Also |
L |