On 2017-07-26 16:22, Michael Van Canneyt via Lazarus wrote:
First start by defining what ComparePoints is supposed to measure or compare.

If "compare" doesn't mean "equals", then a better name should be used, otherwise that too is up for incorrect interpretation.



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?

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.

https://github.com/graemeg/fpGUI/blob/develop/src/corelib/fpg_base.pas#L160..L191



Regards,
  Graeme

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus

Reply via email to