[fpc-pascal] named parameter
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Sun May 28 00:47:48 CEST 2017
On 2017-05-27 21:14, noreply at z505.com wrote:
>> f(p3 := true);
>> ;
> You can do something similar already with source comments
>
> SomeProc(true {p3})
That will not work. p3 in his example is the 3rd parameter. You are only
passing one parameter, so that will then become p1's value. And if the
types don't match, you'll get a compiler error.
Optional parameters can only be at the end of the parameter list, and
always from left-to-right.
Regards,
Graeme
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
My public PGP key: http://tinyurl.com/graeme-pgp
More information about the fpc-pascal
mailing list