The OPEN.FILE call is generated by the BASIC+ interpreter in order to create a file handle for the file. The BFS creates a handle that it will recognize for subsequent read, write, and other record-oriented requests. The format of the file handle is dependent on the BFS being accessed.

Once the file handle has been created and returned from the BFS, the BASIC+ interpreter stores it in field five of the FILES file entry for the file in question. Any file that has already been opened during the current OpenInsight session will have a file handle in this field.

If the BASIC+ interpreter detects a file handle in the FILES file for the file being accessed, it will not generate a call to the filing system to return a handle. Instead, the handle is simply read from the FILES file and returned to the BASIC+ OPEN statement. This results in greater efficiency by lowering the overhead required to return a file handle.

  • No labels