[fpc-pascal] same routine with different parameters?

Sven Barth pascaldragon at googlemail.com
Wed Oct 30 10:25:39 CET 2013


Am 30.10.2013 02:06, schrieb waldo kitty:
>
>> Assume that this is for value parameters only. In particular, I don't 
>> think
>> there's a way of defaulting a var parameter to a nil pointer.
>
> hummm... the original has no parameters at all... my addition has 
> two... will this be a problem? no, i've not had a chance to get back 
> to the development machine and try :?
>
If you'd use two default parameters this would be problematic, yes, 
because a call to this overloaded function could either mean to call the 
function with no arguments or to call the other function with its two 
default values. Normally the compiler should then tell you that what 
you're trying to do is ambigous.

Regards,
Sven



More information about the fpc-pascal mailing list