Am 26.07.2017 19:51 schrieb "Graeme Geldenhuys via Lazarus" <
lazarus@lists.lazarus-ide.org>:
>> If "equals" is needed, why not simply use p1=p2 ?
>
>
> If operator overload exists for the types then sure, but as you know I
like OOP approaches to things.
>
> Also is TPoint a record or a object or a class?

It's an advanced record with methods and operator overloads:
https://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/rtl/inc/typshrdh.inc?revision=33062&view=markup

> 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.

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 :/ ).

Regards,
Sven
-- 
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to