Optional parameters

Posted by ecsousa on 29-Sep-2015 08:42

Does Progress allow optional parameters in method or function? Can I do something like this in any way?

Like this:

function test return logical (input x as int, input y as int ):
    return true.
end function.

test(1, 2).
test(1,).
test(,)

All Replies

Posted by christian.bryan@capita.co.uk on 29-Sep-2015 08:47

If use the OO parts of Openedge you can overload methods.

Posted by Tim Kuehn on 30-Sep-2015 09:26

Progress does not allow structures like that. With OO you can use signature polymorphism to implement different method signatures, or you could just pass ? for the parameter you don't care about and test for that in the function.

This thread is closed