Include Files Section

Silk Performer supports an include-file technique with a syntax similar to include statements in C. Include files (extension bdh) can contain any code sections of a BDL script. Usually you define global constants, DLL functions and helper functions in include files. This enables you to reuse code written in include files in other BDL scripts. The include file section lists the external files to be included during the compilation of a BDL script. Include files must be declared before the objects they contain are used. Include statements in Silk Performer cause one or more specified files to be included during the compilation of a test script. Multiple sections (dclrand, var, const, dclfunc, dll) in any order are supported in include files.

Include files are declared with the keyword use.

The include file search path order is as follows:
  1. Default Include directory (system setting)
  2. Custom Include directory (system setting)
  3. <actual project directory>\Include (if existing)
  4. <actual project directory>\Custom Include (if existing)
  5. <actual project directory>

Syntax

IncludeStatement = "use" Filename.

FileName: string constant (the name or path of the include file).

Example

The following is an example of a BDL file:

const
  DSN1 := "dsn_oracle";
  DSN2 := "sample";

use "odbc.bdh"
use "test.bdh"

Example

The following is an example of an Include file (ODBC.BDH)

const
  SQL_SUCCESS := 0;

dll "odbc32.dll"
  "SQLAllocEnv" function SqlAllocEnv(out number): number;

use "..\\bdh\\kernel.bdh"