compile_Xbasic_function_library Function

Syntax

dim compiledLib as p = compile_Xbasic_function_library(C functionLibraryName [,C searchPath ])

Arguments

functionLibraryNameCharacter

Name of the Xbasic function library without the ".a5xbfl" prefix.

searchPathCharacter

An optional search path. Used in cases where the Xbasic function library is not saved in the web root.

Returns

compiledLibPointer

An object that contains the functions loaded from the Xbasic function library. Functions are called as members of the object. For example, p.myFunction()

Description

Used in a web application to compile an Xbasic Function Library so that functions defined in the library can be called. You can pass in an optional searchPath for the Function Library.

Suppose you have created an Xbasic function library called "lib1" with the following function:

function f1 as c()
    f1 = "value returned by f1()"
end function

The Xbasic function library "lib1" can be included in another Xbasic function library as follows:

function f2 as c()
    dim p as p

    ' Load Xbasic Function Library 'lib1'
    p = compile_xbasic_function_library("lib1")

    ' Call function f1()
    f2 = p.f1()
end function

See Also