Lazarus

Programming => General => Topic started by: jamie on July 03, 2020, 05:49:52 pm

Title: [Answerd]Question about Records in Constant fields for initialization
Post by: jamie on July 03, 2020, 05:49:52 pm
I just found that if I have a complex record in the CONST define area and desire
I can do this

Const
 TagName :TheRecordType = ();


 Does that actually generate a zeroed field for all members in the record ?
Title: Re: Question about Records in Constant fields for initialization
Post by: ASerge on July 03, 2020, 06:24:08 pm
Const
 TagName :TheRecordType = ();
 Does that actually generate a zeroed field for all members in the record ?
Yes. Like in Delphi.
Title: Re: Question about Records in Constant fields for initialization
Post by: jamie on July 03, 2020, 07:26:35 pm
Const
 TagName :TheRecordType = ();
 Does that actually generate a zeroed field for all members in the record ?
Yes. Like in Delphi.

Good, I wanted to be sure before you get carried away with massive field assignments.
TinyPortal © 2005-2018