The file‑stack subroutines

UI Toolkit file‑stack subroutines can maintain one or more file stacks. These routines are used by Toolkit’s list processor, and can be used from your applications as well.

Multiple file stacks are supported by passing an optional channel number, which is synchronized with the current file stack number. If the channel number is not passed, the default file stack will be used. The default file stack is separate from any file stack accessed by a channel number.

The file‑stack subroutines allocate a private memory cache to minimize disk I/O. The scratch file is, therefore, not opened until the cache overflows for the first time. Thus, the channel number passed to these routines is not a true Synergy I/O channel, but rather a handle (virtual channel).

UI Toolkit supports the following file‑stack subroutines:

FS_APPEND - Append a record to the current logical file

FS_CLOSE - Close one or more logical files

FS_INIT - Initialize a file‑stack system

FS_OPEN - Add a logical file to the top of the stack

FS_PARAM - Get a logical file’s parameters

FS_QUIT - Terminate a file‑stack system

FS_READ - Read an existing record from a logical file

FS_WRITE - Write a record to a logical file