<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">
      <blockquote type="cite">does Advanced Record constructor
        automatically zero all the memory space of that record?</blockquote>
      No, it does not. Neither in Delphi nor in FPC.<br>
      <br>
      Am 24.09.2013 12:36, schrieb Dennis Poon:<br>
    </div>
    <blockquote cite="mid:52416B3E.5070006@avidsoft.com.hk" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <font size="+1">if not, is there a clean and easy way to
        initialize the
        entire record memory space to zeros e.g. <br>
        <br>
        constructor TMyRecord.Create(TheValue : Integer);<br>
        begin<br>
          FillChar(self, sizeof(Self), 0);<br>
          Value := TheVal;<br>
        end;<br>
      </font></blockquote>
    <font size="+1"><font size="+1">You can use either FillChar as you
        did or <font size="+1">use "Self <font size="+1">:=
            Default(TTest);"</font></font></font></font> (default is a
    compiler intrinsics that returns a 0 value of the type you passed
    in, e.g. Nil for classes, '' for strings, 0 for ordinals and for
    records all fields are set to 0)<br>
    <blockquote cite="mid:52416B3E.5070006@avidsoft.com.hk" type="cite"><font
        size="+1">
        Is there a Self variable for advanced record
        methods/constructors ?<br>
      </font></blockquote>
    <font size="+1">Yes.</font><br>
    <blockquote cite="mid:52416B3E.5070006@avidsoft.com.hk" type="cite"><font
        size="+1">
        By the way, is there an ultimate inherited constructor "Create"
        for all
        advanced record types?</font><br>
    </blockquote>
    No.<br>
    <br>
    Regards,<br>
    Sven<br>
  </body>
</html>