Consultor Eletrônico



Kbase P11002: Optional parameters for User-defined functions
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   25/03/2003
Status: Unverified

GOAL:

How to 4GL user-defined function with optional parameters

FIX:

A number of built-in functions allow optional parameters (eg.ENTRY()). At the time of writting, user defined functions and user defined procedures do not allow optional parameters. This has already been logged as an enhancement request under 1063(specifically) and customers are encouraged to register their votes at: Progress Enhancement Request System (a login_id is required).

In order to achieve this end, different variations of the same function need to be written for different parameter signatures. A CHAR parameter for example, can be defined with a delimited list, then pick the needed parameters out of the list. An example is included below called "NamedData.p"