Description


example : There procedure with well-known structure and functionality used in code entry ExcelExport ;******************** params string Entity:in string ColumnList:in endparams As new customer demands appears, some extension are needed entry ExcelExport ;******************** params string Entity:in string ColumnList:in >>> optional string Condition=\\\\\\\"\\\\\\\":in <<< endparams and some time later another param needed entry ExcelExport ;******************** params string Entity:in string ColumnList:in optional string Condition=\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\":in >>> optional numeric FromInExcelRow=1:in <<<< endparams and so on

Use Case


Every change to interface needs new proc or component operation . As time goes on , parameter changes leads to creating new and new function names

Importance



Type


Proc Code

Operating System


Not Applicable

Status


Open

3 thoughts on “Optional prarmeters”

  1. for activate, there is already a /list switch with the following meaning (Helpfile 9601 x104):
    /list—passes two parameters in ArgumentList, each of which is a typed Uniface list. This is useful when the number of parameters of the operation is unknown.

    perhaps this logic can be applied to all other invocation of procedures via call as well as the arrow operator, may be even applicable for functions returning a value.

    And if the implementation cracefully handles an input list which is too short assuming the additional parameters are NULL, we can have the whole optional show.

    The alternative is to use uniface indexed lists as “containers” for in- and output.
    Is very flexible and can be applied with the currently available means of uniface.

    call use_container(“name=mustermann;firstname=max”,var_outcontainer)
    message/info $concat(“Here is the “,$item(“fullname”,var_outcontainer))

  2. So you must be sure , that all call must be done by /list switch , to add another parameter to existing function.. Default value must be NULL.

    Using Indexed lists container parameter is not way to create clear interface.

Leave a Reply