Difference between revisions of "INCLUDE()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
Load a library file built with the Recital C Extensions API or a Recital procedure library
+
Load a procedure or C Extensions library
 
+
  
 
==Syntax==
 
==Syntax==
 
INCLUDE(<expC>)
 
INCLUDE(<expC>)
 
  
 
==See Also==
 
==See Also==
 
[[CLOSE PROCEDURE]], [[DO]], [[FUNCTION]], [[INCLUDE_ONCE()]], [[LINK]], [[LIST PROCEDURE]], [[PARAMETERS]], [[PROCEDURE]], [[RELEASE LIBRARY]], [[REQUIRE()]], [[REQUIRE_ONCE()]], [[SET LIBRARY]]
 
[[CLOSE PROCEDURE]], [[DO]], [[FUNCTION]], [[INCLUDE_ONCE()]], [[LINK]], [[LIST PROCEDURE]], [[PARAMETERS]], [[PROCEDURE]], [[RELEASE LIBRARY]], [[REQUIRE()]], [[REQUIRE_ONCE()]], [[SET LIBRARY]]
 
  
 
==Description==
 
==Description==
The INCLUDE() 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, '.so' is assumed on UNIX/Linux.  To load a Recital 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 INCLUDE() function opens the specified extension or 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.
 
+
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 [[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 Recital procedure library files.
+
The SET PROCEDURE and CLOSE PROCEDURE commands can also be used to handle 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 C Extensions API, please see the [[:Category:SDK|C Extensions API documentation]].
 
 
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
// Open Samples.so API procedure library
+
// Open pdf.so C extensions library located in current directory
include("Samples")
+
include("pdf.so")
// Close pdf.so API procedure library
+
// Close pdf.so C extensions library
 
release library pdf.so
 
release library pdf.so
// Close all active API procedure library files
+
// Close all active C extensions library files
 
set library to
 
set library to
 
</code>
 
</code>
  
 
==Products==
 
Recital, Recital Server
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]

Revision as of 09:54, 9 January 2013

Purpose

Load a procedure or C Extensions library

Syntax

INCLUDE(<expC>)

See Also

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

Description

The INCLUDE() function opens the specified extension or 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.

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 procedure library files.

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

Example

// Open pdf.so C extensions library located in current directory
include("pdf.so")
// Close pdf.so C extensions library
release library pdf.so
// Close all active C extensions library files
set library to