Introduction
A user defined function in Progress ABL is a reusable program module.
- A function must be declared in the "main" procedure. It cannot be declared inside a procedure or inside another function.
- A function in Progress ABL isn't a "first class citizen" unlike in programming languages like Haskell or Javascript. You cannot pass a function as an input or output parameter. You can however invioke them dynamically using
DYNAMIC-FUNCTION
or the CALL
object.
- Calling functions in your queries can lead to bad performance since index matching will hurt. Try to assign the value of the function to a variable and use that variable in the
WHERE
-clause instead.