Compare two objects

Compare two objects

Postby Natter » Thu Sep 15, 2016 3:48 pm

Hi, all !

How to check the equivalence of two objects (e.g. fonts) ?
Natter
 
Posts: 1205
Joined: Mon May 14, 2007 9:49 am

Re: Compare two objects

Postby James Bott » Thu Sep 15, 2016 3: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
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: Compare two objects

Postby Natter » Thu Sep 15, 2016 7:07 pm

No, if you write oObject1 = oObject2 you'll get an error
Natter
 
Posts: 1205
Joined: Mon May 14, 2007 9:49 am

Re: Compare two objects

Postby cnavarro » Thu Sep 15, 2016 8:04 pm

This run OK for me

Code: Select all  Expand view


   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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Compare two objects

Postby Natter » Fri Sep 16, 2016 5:22 am

Thank you ! My mistake was that to compare objects, I used the " = " sign, and it is necessary "=="
Natter
 
Posts: 1205
Joined: Mon May 14, 2007 9:49 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 66 guests