<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">On 11/4/2018 11:24 AM, Sven Barth via
      fpc-devel wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAFMUeB9aA56N6VZ-vMHkfjwmzQQv1ydJ3a2W4+jHWBxBONVsrw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      <div dir="auto">
        <div>
          <div class="gmail_quote">
            <div dir="ltr">Am So., 4. Nov. 2018, 12:23 hat Schindler
              Karl-Michael <<a
                href="mailto:karl-michael.schindler@web.de"
                moz-do-not-send="true">karl-michael.schindler@web.de</a>>
              geschrieben:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
              <br>
              > Am 04.11.2018 um 12:00 schrieb Ben Grasset <<a
                href="mailto:operator97@gmail.com" target="_blank"
                rel="noreferrer" moz-do-not-send="true">operator97@gmail.com</a>>:<br>
              > <br>
              > From: Ben Grasset <<a
                href="mailto:operator97@gmail.com" target="_blank"
                rel="noreferrer" moz-do-not-send="true">operator97@gmail.com</a>><br>
              > To: FPC-Devel users discussions <<a
                href="mailto:fpc-devel@lists.freepascal.org"
                target="_blank" rel="noreferrer" moz-do-not-send="true">fpc-devel@lists.freepascal.org</a>><br>
              > Subject: Re: Array assignment operator<br>
              > Message-ID: <<a
href="mailto:CAL4d7FjPfX-ysT6Z3--fhPR9Pts-N47ksFN6m2pHD7SunzwpJg@mail.gmail.com"
                target="_blank" rel="noreferrer" moz-do-not-send="true">CAL4d7FjPfX-ysT6Z3--fhPR9Pts-N47ksFN6m2pHD7SunzwpJg@mail.gmail.com</a>><br>
              > Content-Type: text/plain; charset="utf-8"<br>
              > <br>
              > On Sat, Nov 3, 2018 at 4:44 PM Gennady Agranov <<a
                href="mailto:gennadyagranov@gmail.com" target="_blank"
                rel="noreferrer" moz-do-not-send="true">gennadyagranov@gmail.com</a>><br>
              > wrote:<br>
              > <br>
              >> Hi,<br>
              >> <br>
              >> Leaving aside the reason why the MiSchi's
              solution doesn't work the main<br>
              >> question is still not answered :)<br>
              >> <br>
              >> If you have integer dynamic array "MyArray" is
              there a way for the<br>
              >> following statement to compile and work
              correctly:<br>
              >> <br>
              >> MyArray := 5;<br>
              >> <br>
              > <br>
              > Uh, yes? That's what my example showed.<br>
              <br>
              In your example the length of the array was set to the
              number and the elements of the array assigned to their
              index, whereas my intention is to keep the length of the
              array and fill all elements to the same number.<br>
            </blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">The operator always creates a new array and does
          not modify the existing one. </div>
        <div dir="auto">You'd need to abuse a binary operator (e.g.
          >< or even <=) for this. </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Regards, </div>
        <div dir="auto">Sven </div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
            </blockquote>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
fpc-devel maillist  -  <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel">http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel</a>
</pre>
    </blockquote>
    <p>I was thinking that type helper might work - e.g.
      MyArray.SetValue(5) and with using properties MyArray.Value := 5</p>
    <p>But seems that even simple type helper is not working anymore?</p>
    <p>E.g. I was not able to compile example from
      <a class="moz-txt-link-freetext" href="http://wiki.freepascal.org/Helper_types">http://wiki.freepascal.org/Helper_types</a> :(<br>
    </p>
    <pre class="de1">TTypeHelper <span class="sy3">=</span> <span class="kw1">type</span> helper <span class="kw1">for</span> <span class="kw4">Integer</span>
  <span class="kw1">procedure</span> SetZero<span class="sy1">;</span>
<span class="kw1">end</span><span class="sy1">;</span></pre>
    <p>Thanks,</p>
    <p>Gennady<br>
    </p>
    <p><br>
    </p>
    <p><br>
    </p>
  </body>
</html>