[fpc-pascal] named parameter

Ryan Joseph ryan at thealchemistguild.com
Sat May 27 12:17:40 CEST 2017


> On May 27, 2017, at 5:13 PM, Mark Morgan Lloyd <markMLl.fpc-pascal at telemetry.co.uk> wrote:
> 
> someFunction(TPoint(X:0.0; Y:0.0));
> 
> Pascal purists would probably object to that style, since what it's effectively doing is passing the parameters as an explicit list.

I mentioned this form of “default constructor" as a sorely missing feature in FPC a couple weeks ago. Making redundant constructors for records constantly is pretty silly. If I could figure out the compiler code I would add this myself since it’s probably one of the easier things to implement.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list