[fpc-pascal] named parameter
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Sat May 27 11:27:26 CEST 2017
On 2017-05-27 09:47, Mark Morgan Lloyd wrote:
> It would probably be possible to do it by using a record with nullable
> fields as the parameter.
Yeah, that was going to be my suggestion too. I've done this many times
when many parameters are optional. Use a record as parameter type. The
other benefit of this is that it is future and backwards compatible. You
can add or change parameters without breaking the method signature.
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