[progress Communities] [progress Openedge Abl] Forum Post: Comparing Objects (less Than /...

  • Thread starter Thread starter Lieven De Foor
  • Start date Start date
Status
Not open for further replies.
L

Lieven De Foor

Guest
Hi, Currently you can write the following code: CLASS MyClass: DEFINE PUBLIC PROPERTY Value AS INTEGER NO-UNDO GET. SET. END CLASS. /****************************************************/ DEFINE VARIABLE MyFirstObject AS MyClass NO-UNDO. DEFINE VARIABLE MySecondObject AS MyClass NO-UNDO. MyFirstObject = NEW MyClass(). MySecondObject = NEW MyClass(). MyFirstObject:Value = 2. MySecondObject:Value = 1. MESSAGE MyFirstObject operators are interpreted. The first created object seems to be always less than the second created one, which leads me to believe that the internal handle value gets compared. There should be a way to influence this, e.g. by implementing a IComparable interface like in c# https://msdn.microsoft.com/en-us/library/system.icomparable(v=vs.110).aspx Or am I missing something and is this possible in ABL?

Continue reading...
 
Status
Not open for further replies.
Back
Top