Skip To Content

INTEGRAL

INTEGRAL DSL Reference Guide

Jump directly to: 

::my.execute(dirname, filename = "", flags = 0, change_dir = true)

This function includes another INTEGRAL file and executes it. This file can be either INTEGRAL DSL source code or ITEGRAL DSL bytecode. The function can also change the current working directory, if necessary, before including and executing the specified INTEGRAL file.

Parameters

dirname

A string containing the name (path) of the directory relative to which filename should be resolved. Depending on flags, dirname itself is either relative to the current working directory or INTEGRAL Application Server's working directory.

filename

A string containing the name (path) of the INTEGRAL file to be included and executed. This path is relative to the path specified by the dirname parameter.

If filename is an empty string, no INTEGRAL file will be included and executed. However, the function can still be used to change the current working directory, as long as change_dir is set to true.

flags

A bitmask that can be used to customize the behavior of the function.

change_dir

A boolean parameter. If true, the function will change the current working directory to dirname before including and executing the specified INTEGRAL file. This means the executed INTEGRAL file (i.e. subsequent INTEGRAL DSL code) will see dirname as the current working directory. If false, the function will not change the current working directory. In this case the execute function behaves much like include.

Return Value

The function returns DV_RET_OK on success and DV_RET_ERR on failure.

Notes

Once the function returns, your program resumes where it left off. If you do not wish your program to resume normally, remember to add return (external page) immediately after execute.

Example 1

::my.execute("../../docs-basic/demos/", "letter-job.i");

Example 2

::my.execute("", "letter-job.i");

Example 3

::my.execute("", "letter-job.i", 1);

Example 4

::my.execute("../../docs-basic/demos/");