On Tue, Feb 24, 2004 at 04:13:33AM +0800, Neil Santos wrote:
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?
[...]
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?
GPC supports overloading only for operators, not functions. Optional parameters are not supported either; they could be sort of simulated by variable arguments ("..."), but these are meant only for compatibility with C libraries, it is not possible to define a Pascal function which uses varargs.
Emli Jerabek