FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Compare two objects
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Compare two objects
Posted: Thu Sep 15, 2016 03:48 PM

Hi, all !

How to check the equivalence of two objects (e.g. fonts) ?

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: Compare two objects
Posted: Thu Sep 15, 2016 03:54 PM

Natter,

I have not tried it, but you might try:

if(oObject1 = oObject2,.t.,.f.)

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Compare two objects
Posted: Thu Sep 15, 2016 07:07 PM

No, if you write oObject1 = oObject2 you'll get an error

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Compare two objects
Posted: Thu Sep 15, 2016 08:04 PM
This run OK for me

Code (fw): Select all Collapse
   if oObject1 == oObject2
      ? "Si"
   endif
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 1392
Joined: Mon May 14, 2007 09:49 AM
Re: Compare two objects
Posted: Fri Sep 16, 2016 05:22 AM

Thank you ! My mistake was that to compare objects, I used the " = " sign, and it is necessary "=="

Continue the discussion