8 26 Function Libraries

LANSA Technical

8.26 Function Libraries

An alternative way of using Intrinsic Functions is to import function libraries. Function Libraries are a component that contains a set of routines defined using the MthRoutine command. These function library routines can be used in expressions.

There are function libraries for the following:

string

#PRIM_LIBS

number

#PRIM_LIBN

date and time

#PRIM_LIBD

*VARIANT

#PRIM_LIBV

 

For string, number, date and time, using Intrinsic Functions is simpler than using a function library.

To handle objects of type *VARIANT, you need to use the variant function library #PRIM_LIBV. (Refer to 8.27 Variant Handling.)

When using function library methods the syntax is different.

For example the Uppercase method:

#Subject.Uppercase()
 

is specified as:

Uppercase( Subject )
 

Function libraries are introduced into a RDMLX object by the 8.14 IMPORT command which is specified immediately after the FUNCTION statement. For example:

Function Options(*DIRECT)
* Import the variant library #prim_libv.
Import Libraries(#PRIM_LIBV)
 

Once a Function library has been imported, the routines defined in the library can be used in expressions.

Ý 8. RDMLX Commands and RDMLX Features