How does GPC support function/procedure overloading when it allows the declaration of parameters to be skipped when it comes to the implementation of a function/procedure?
I read somewhere that a function/procedure declaration in an interface need not be duplicated for the implementation. UIM, the text referred to Extended Pascal.
Say function foo is declared like this in the interface section of a module:
function foo(bar : integer) : some_return_type;
In the implementation, one could just do:
function foo; begin {do interesting stuff here} end;
Is it possible to overload foo (i.e., to accept a baz parameter, aside from bar) without resorting to having two code blocks with slightly different parameter declarations?
And on a slightly related question: Does GPC support, as an extension to Pascal, optional paramaters the way Ada supposedly does? If so, could someone please point me towards the direction I should go in order to find out how? If not, does anyone else think that this would be a useful extension?
Thanks for your time.