Recent

Author Topic: [Answerd]Question about Records in Constant fields for initialization  (Read 328 times)

jamie

  • Hero Member
  • *****
  • Posts: 3512
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 ?
« Last Edit: July 03, 2020, 07:27:00 pm by jamie »
The only true wisdom is knowing you know nothing

ASerge

  • Hero Member
  • *****
  • Posts: 1665
Re: Question about Records in Constant fields for initialization
« Reply #1 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.

jamie

  • Hero Member
  • *****
  • Posts: 3512
Re: Question about Records in Constant fields for initialization
« Reply #2 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.
The only true wisdom is knowing you know nothing

 

TinyPortal © 2005-2018