<p>Am 26.07.2017 19:51 schrieb "Graeme Geldenhuys via Lazarus" <<a href="mailto:lazarus@lists.lazarus-ide.org">lazarus@lists.lazarus-ide.org</a>>:<br>
>> If "equals" is needed, why not simply use p1=p2 ?<br>
><br>
><br>
> If operator overload exists for the types then sure, but as you know I like OOP approaches to things.<br>
><br>
> Also is TPoint a record or a object or a class?</p>
<p>It's an advanced record with methods and operator overloads: <br>
<a href="https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/inc/typshrdh.inc?revision=33062&view=markup">https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/inc/typshrdh.inc?revision=33062&view=markup</a></p>
<p>> In fpGUI the equivalent of TPoint and TRect are object types and has many related methods defined inside them. I don't believe p1 = p2 is going to work with the object data type.</p>
<p>For object types you'll need to declare global operator overloads to use e.g. the = operator (which have the disadvantage that they don't work with generics... at least not yet :/ ).</p>
<p>Regards,<br>
Sven</p>