<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr">Nitorami <<a href="mailto:mneubauer@alice-dsl.net" target="_blank" rel="noreferrer">mneubauer@alice-dsl.net</a>> schrieb am Mi., 6. Juni 2018, 22:39:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">>2) dynamic arrays can index directly into records and write to fields but<br>
the [] operator overload can’t do this. <br>
<br>
I don't understand this, can you provide an example ?<br></blockquote></div><div dir="auto"><br></div><div dir="auto">With dynamic arrays that contain records you can do this:</div><div dir="auto"><br></div><div dir="auto">=== code begin ===</div><div dir="auto"><br></div><div dir="auto">var </div><div dir="auto"> parr: array of TPoint;</div><div dir="auto">begin</div><div dir="auto"> // init parr </div><div dir="auto"> // ... </div><div dir="auto"> parr[0].x := 42;</div><div dir="auto">end. </div><div dir="auto"><br></div><div dir="auto">=== code end ===</div><div dir="auto"><br></div><div dir="auto">However you can't do that with indexed properties (which is the feature that Ryan meant) as the value returned by the property getter is merely a copy and not a reference. </div><div dir="auto">For completeness sake: for primitive types (except ShortString) and implicit pointer types (classes, interfaces, dynamic arrays, string types except ShortString) this behavior is not relevant.</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven</div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div></div>