Search code examples
openedgeprogress-4gl

Difference between the internal procedures and functions in Progress4gl?


Both internal procedures and functions are accepting the parameters to give the output. So what is the use of using Internal procedures instead of functions.


Solution

  • A user-defined function is used when you want to perform some calculation and return a single value. In this respect it is the same as a built-in ABL function, like the SUBSTRING or EXP functions. Putting this calculation code in a FUNCTION block instead of inline in your code allows you to put it in one place and reference it multiple times without code duplication.

    An internal procedure is also an encapsulated piece of code that does some work, but it is more general-purpose. While a function must return a single value, an internal procedure may or may not have input parameters or output parameters.

    https://docs.progress.com/category/openedge-archives