<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">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">operator97@gmail.com</a>>:<br>
> <br>
> From: Ben Grasset <<a href="mailto:operator97@gmail.com" target="_blank" rel="noreferrer">operator97@gmail.com</a>><br>
> To: FPC-Devel users discussions <<a href="mailto:fpc-devel@lists.freepascal.org" target="_blank" rel="noreferrer">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">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">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>