Difference between revisions of "REQUIRE()"

From Recital Documentation Wiki
Jump to: navigation, search
(Products)
Line 6: Line 6:
  
 
==Purpose==
 
==Purpose==
Load an API library file built with the Recital SDK or a Recital/4GL procedure library
+
Load a library file built with the Recital C Extensions API or a Recital procedure library
  
  
Line 18: Line 18:
  
 
==Description==
 
==Description==
The REQUIRE() function opens the specified API or 4GL 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, '.dll' is assumed on Windows and '.so' on UNIX/Linux.  To load a 4GL library file, the '.prg' or '.dbo' file extension must be included.  You can place as many procedures as you want in a procedure library file.  By default, library files are loaded from the sharedlib directory: usually <Program Files>Recitalsharedlib on Windows and /usr/recital/sharedlib on UNIX/Linux, but defined in the DB_LIBDIR Registry setting / environment variable.  To load a library that is not in the current directory or the sharedlib directory, the full path must be included.
+
The REQUIRE() function opens the specified API or Recital 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, '.dll' is assumed on Windows and '.so' on UNIX/Linux.  To load a Recital procedure library file, the '.prg' or '.dbo' file extension must be included.  You can place as many procedures as you want in a procedure library file.   
  
The SET LIBRARY TO command, without any filename specified, closes all active API procedure library filesA 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 API library file.
+
C Extensions libraries in the shared library directory are loaded automatically at the start of a Recital processThe shared library directory location is defined by the DB_LIBDIR environment variable in the [[Configuration Files|recital.conf]] file.
  
The SET PROCEDURE and CLOSE PROCEDURE commands can also be used to handle Recital/4GL procedure library files.
+
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 Recital 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 Recital SDK, please see the SDK documentation.
+
For full details on using the Recital C Extensions API, please see the [[:Category:SDK|C Extensions API documentation]].
  
  

Revision as of 15:11, 18 February 2010

Template:YLM to do Check php compatibility / OOPS



Purpose

Load a library file built with the Recital C Extensions API or a Recital procedure library


Syntax

REQUIRE(<expC>)


See Also

CLOSE PROCEDURE, DO, FUNCTION, LINK, LIST PROCEDURE, PARAMETERS, PROCEDURE, RELEASE LIBRARY, REQUIRE_ONCE(), SET LIBRARY


Description

The REQUIRE() function opens the specified API or Recital 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, '.dll' is assumed on Windows and '.so' on UNIX/Linux. To load a Recital procedure library file, the '.prg' or '.dbo' file extension must be included. You can place as many procedures as you want in a procedure library file.

C Extensions libraries in the shared library directory are loaded automatically at the start of a Recital 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 Recital procedure library files.

The active procedures and functions can be listed with the LIST or DISPLAY PROCEDURE commands.

For full details on using the Recital 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

Recital, Recital Server