[fpc-pascal] Default record const values

Ryan Joseph ryan at thealchemistguild.com
Thu Nov 29 03:36:50 CET 2018



> On Nov 29, 2018, at 2:27 AM, Benjamin Rosseaux <benjamin at rosseaux.com> wrote:
> 
> TTestHelper = record helper for TTest
>   public
>     const Default: TTest = (a: 1; b: 2);
>   end;

I didn’t even know you could add consts to record helpers. That’s good to know, thanks.

Multi scoped helpers will make this a safe solution which you don’t have to worry about being overwritten in other units. Hopefully I can submit a patch for the trunk soon.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list