Page History
MFS programmers will notice quickly that there is not a one-to-one correspondence between a BASIC+ OPEN statement and an MFS-level OPEN.FILE call. In fact, as a rule, an OPEN.FILE call will be generated only once per session for a given file.
BASIC+ Open File Handle
The file handle returned in the BASIC+ OPEN statement is not identical to that stored in the FILES file. BASIC+ OPEN returns a file handle that contains both the filing system list for a file (the MFS and BFS list) as well as the file handle required by the BFS. The filing system list is the first value (@VM-delimited) of the returned handle, and the BFS file handle is the second value. Multiple MFSs in the file handle are delimited with @SVM.
For example, the BFS EX.BFS might return a file handle looking like this:
Code Block |
---|
\DATA\REV10000 |
If the file has SI.MFS and SAMPLE.MFS installed, the file handle returned by the BASIC+ OPEN statement will be:
Code Block |
---|
SI.MFS n SAMPLE.MFS n EX.BFS 2 \DATA\REV10000 |
Updating the File Handle
One implication of storing the file handle is that the handle and MFS information stored in the FILES file must be updated if anything about a file changes that would normally affect the file handle.
...