Difference between revisions of "REQUIRE()"
Yvonne.milne (Talk | contribs) m (1 revision) |
m (Text replace - "Recital" to "Lianja") |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
− | Load a library file built with the | + | Load a library file built with the Lianja C Extensions API or a Lianja procedure library |
Line 12: | Line 12: | ||
==Description== | ==Description== | ||
− | The REQUIRE() function opens the specified API or | + | The REQUIRE() function opens the specified API or Lianja procedure library file, scans the contents of it, and records the names and positions of the procedures defined within it. The <expC> is the name of the library file. If the file extension is not stated, '.so' is assumed on UNIX/Linux. To load a Lianja procedure or class library file, the '.prg' or '.dbo' file extension must be included. You can place as many procedures or classes as you want in a procedure library file. |
− | C Extensions libraries in the shared library directory are loaded automatically at the start of a | + | C Extensions libraries in the shared library directory are loaded automatically at the start of a Lianja process. The shared library directory location is defined by the DB_LIBDIR environment variable in the [[Configuration Files|recital.conf]] file. |
The SET LIBRARY TO command, without any filename specified, closes all active C Extensions library files. A closed library file discards any knowledge of where the procedures within reside. The RELEASE LIBRARY <library filename> command can be used to close an individual C Extensions library file. | The SET LIBRARY TO command, without any filename specified, closes all active C Extensions library files. A closed library file discards any knowledge of where the procedures within reside. The RELEASE LIBRARY <library filename> command can be used to close an individual C Extensions library file. | ||
− | The SET PROCEDURE and CLOSE PROCEDURE commands can also be used to handle | + | The SET PROCEDURE and CLOSE PROCEDURE commands can also be used to handle Lianja procedure library files. |
The active procedures and functions can be listed with the LIST or DISPLAY PROCEDURE commands. | The active procedures and functions can be listed with the LIST or DISPLAY PROCEDURE commands. | ||
− | For full details on using the | + | For full details on using the Lianja C Extensions API, please see the [[:Category:SDK|C Extensions API documentation]]. |
Line 37: | Line 37: | ||
==Products== | ==Products== | ||
− | + | Lianja, Lianja Server | |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] |
Revision as of 06:39, 8 December 2012
Purpose
Load a library file built with the Lianja C Extensions API or a Lianja procedure library
Syntax
REQUIRE(<expC>)
See Also
CLOSE PROCEDURE, DO, FUNCTION, INCLUDE(), INCLUDE_ONCE(), LINK, LIST PROCEDURE, PARAMETERS, PROCEDURE, RELEASE LIBRARY, REQUIRE_ONCE(), SET LIBRARY
Description
The REQUIRE() function opens the specified API or Lianja procedure library file, scans the contents of it, and records the names and positions of the procedures defined within it. The <expC> is the name of the library file. If the file extension is not stated, '.so' is assumed on UNIX/Linux. To load a Lianja procedure or class library file, the '.prg' or '.dbo' file extension must be included. You can place as many procedures or classes as you want in a procedure library file.
C Extensions libraries in the shared library directory are loaded automatically at the start of a Lianja process. The shared library directory location is defined by the DB_LIBDIR environment variable in the recital.conf file.
The SET LIBRARY TO command, without any filename specified, closes all active C Extensions library files. A closed library file discards any knowledge of where the procedures within reside. The RELEASE LIBRARY <library filename> command can be used to close an individual C Extensions library file.
The SET PROCEDURE and CLOSE PROCEDURE commands can also be used to handle Lianja procedure library files.
The active procedures and functions can be listed with the LIST or DISPLAY PROCEDURE commands.
For full details on using the Lianja C Extensions API, please see the C Extensions API documentation.
Example
// Open Samples.so API procedure library require("Samples") // Close pdf.so API procedure library release library pdf.so // Close all active API procedure library files set library to
Products
Lianja, Lianja Server