[fpc-pascal] Default record const values

Ryan Joseph ryan at thealchemistguild.com
Sat Nov 10 12:17:14 CET 2018


This also fails.

type
	TMyRecord = record
		public
			a: integer;
			b: string;
	end;
const
	TMyRecord_Default: TMyRecord = (a: 100; b: 'foo');

var
	r: TMyRecord = TMyRecord_Default;


> On Nov 10, 2018, at 4:55 PM, Sven Barth via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> 
> TMyRecord is not yet completely parsed. There could be another field located behind the "default" constant. Thus using the type of the record aside from Pointers and method parameters and result is not allowed. 
> 

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list