You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Current »

Much activity that programmers associate with select list processing -- initializing select lists (cursors), fetching record keys, sorting, and selecting (reducing) -- is done not by the filing system, but by special SELECT and READNEXT processors.

These processors, a set of system programs that provide a layer between BASIC+ and the filing system, are the master controllers for select list processing. It is only under the control of these processors that BASIC+ will access the filing system for SELECT and READNEXT processing.

The special SELECT and READNEXT processors automatically take care of the more complex aspects of select list processing such as sorting or reducing. In comparison, the filing system SELECT and READNEXT calls are relatively simple. In most cases, they simply return a group of record keys or records, as directed by the higher-level SELECT and READNEXT processors. Decisions about placing record keys in cursors or sorting blocks of records for extended SELECT logic are made by the special processors.

As a rule, MFS programmers do not need to concern themselves with these esoteric aspects of select list processing. In some cases -- for instance, in SI.MFS -- the MFS deliberately assumes control over specific tasks (in this case, returning sorted key lists). However, an MFS that does not concern the return of a sorted or reduced key list does not need to include logic for these tasks.


READNEXT Direction

When a filing system READNEXT call is made, the status argument is used to pass to the filing system the direction of the READNEXT operation (ascending or descending). The filing system uses this direction in maintaining the select pointer. If the BASIC+ READNEXT operation designates the select list as descending, the select pointer is decremented with each filing system READNEXT operation, rather than being incremented for an ascending READNEXT.

  • No labels