Difference between revisions of "REQUIRE()"
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 1: | Line 1: | ||
==Purpose== | ==Purpose== | ||
− | Load a library file built with the Lianja C Extensions API | + | Load a library file built with the Lianja C Extensions API, a Lianja procedure library or a JavaScript (.js), PHP (.php) or Python (.py) file |
==Syntax== | ==Syntax== | ||
Line 9: | Line 9: | ||
==Description== | ==Description== | ||
− | The REQUIRE() function opens the specified | + | The REQUIRE() function opens the specified, 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, which can be a Lianja API or Lianja procedure library file or a JavaScript (.js), PHP (.php) or Python (.py) file. If the file extension is not stated, '.so' is assumed on 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. |
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. |
Revision as of 12:28, 19 May 2014
Contents
Purpose
Load a library file built with the Lianja C Extensions API, a Lianja procedure library or a JavaScript (.js), PHP (.php) or Python (.py) file
Syntax
REQUIRE(<expC>)
See Also
CLOSE PROCEDURE, DO, FUNCTION, INCLUDE(), INCLUDE_ONCE(), LIST PROCEDURE, PARAMETERS, PROCEDURE, RELEASE LIBRARY, REQUIRE_ONCE(), SET LIBRARY
Description
The REQUIRE() function opens the specified, 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, which can be a Lianja API or Lianja procedure library file or a JavaScript (.js), PHP (.php) or Python (.py) file. If the file extension is not stated, '.so' is assumed on 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.
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.
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