Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Global areas available to an MFS include system @-variables (@USERNAME, @ENVIRON_SET, etc.), user-defined global variables (@USER0-4), and labelled common areas.

A security MFS, for instance, might use the user name and privilege level variables to control access to files. A more sophisticated security system can establish a labelled common area at logon time. The labelled common area might contain lists of files and fields that the user has access to, to be examined by the MFS at every file operation.

...

The arguments for filing system calls come from the various elements of BASIC+ statements. A programmer can thus pass information or keys to the MFS by simply passing them along with data.

One example is the Create_Table command. All parameters following the filename are passed intact to the filing system for its own use. A developer could pass any number of parameters to an MFS by simply adding them onto the ones already being passed. The MFS would examine the parameter string, extract its own parameters, and pass the remaining ones on for further processing.

Programmers can even use BASIC+ READ and WRITE statements to pass information, using the key or record variables. As in the last example, the programmer adds the MFS-specific information into the key or record. The MFS strips the information for its own use, and passes clean data on for further processing.

...

While this method is very useful, it also requires caution. As a rule, if an MFS is modifying basic data (records and keys), then the position of the MFS in the BFS list is important. For instance, it will be critical to install the MFS correctly with respect to SI.MFS, so that data is indexed properly -- not with control information in it.

...