Opens a dBASE Plus program file as the library file, making its functions, classes, and methods available for execution.

Syntax

SET LIBRARY TO [<filename> | ? | <filename skeleton>]

<filename> | ? | <filename skeleton>

The program file to open. The ? and <filename skeleton> options display a dialog box from which you can select a file. If you specify a file without including its path, dBASE Plus looks for the file in the current directory, then in the path you specify with SET PATH. If you specify a file without including its extension, dBASE Plus assumes .PRO (a compiled object file). If dBASE Plus can't find a .PRO file, it looks for a .PRG file (a source file). If dBASE Plus finds a .PRG file, it compiles it.

Description

SET LIBRARY is similar to SET PROCEDURE. Both commands open a program file, allowing access to the functions, classes, and methods the file contains. The difference is that while SET PROCEDURE can add a program file to a list of procedure files, there can be only one library file open at any time. The library file cannot be closed with the SET PROCEDURE command.

Otherwise, the library file is treated like a procedure file. The library and procedure files are searched in the order they were opened. You may want to designate a stable program file with core functionality as the library file, and all other program files as procedure files.

Issue SET LIBRARY TO without a file name to close the open library file.