Library part of type basicLibrary

A library part of type basicLibrary contains a set of functions, variables, and constants that can be used by programs, PageHandlers, or other libraries. It is recommended that you use libraries to maximize your reuse of common code and values.

The type specification basicLibrary indicates that the part is generated into a compilable unit and includes EGL values and code for local execution. This type is the default when the keyword type is not specified. For details on creating a library to access a native DLL from an EGL-generated Java™ program, see Library part of type nativeLibrary.

Rules for a library of type basicLibrary are as follows:

The library is generated separately from the parts that use it. EGL run time accesses the library part by using the setting of the library property alias, which defaults to the EGL library name.

At run time, the library is loaded when first used and is unloaded when the program or PageHandler that accessed the library leaves memory, as occurs when the run unit ends..

A PageHandler gets a new copy of the library whenever the PageHandler is loaded. Also, a library that is invoked by another library remains in memory as long as the invoking library does.

A library that is used only for its constants is not loaded at run time because constants are generated as literals in the programs and PageHandlers that reference them.

Related concepts
Library part of type nativeLibrary
Library part of type ServiceBindingLibrary
Run unit
Segmentation in text applications
show
transfer
Use declaration

Related reference
converse
forward
Function part in EGL source format
Library part in EGL source format
Run unit
Segmentation in text applications
show
transfer
Use declaration

Feedback
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.