Library classifier overview

The capabilities of the Library classifier are made available when you code a library, which is accessible from other EGL code that runs on the same platform. The type is static; you do not create variables based on it.

Here is an example:

Library MyLibrary {}

   // variables and constants are usually here

   function calculate(myScore INT[]) returns (BIN (4,2)) 

      numberOfScores, i, mySum INT;
      numberOfScores = myScore.getSize();
      	
      for (i from 1 to numberOfScores by 1)
         mySum = myScore[i] + mySum;	       
      end
    	      
      return(mySum/numberOfScores);
   end

   // other functions are here

end

The example function calculate can be invoked from other library functions and from logic deployed locally; for example, from a program or other library.

A library is loaded the first time you use it and is unloaded when the run unit ends. The public fields and functions in the library are run-unit global, as described in “Name resolution at run time.”

The next table lists the stereotypes that are available for a Library type.

Stereotype Purpose
none specified To provide functions and fields that are written in EGL source code.
NativeLibrary To access non-EGL logic that is stored in dynamic link libraries (DLLs). this capability is not available now.
Rich UI properties library To give a Rich UI application access to displayable text from an external file. The text can vary by human language.