how to distinguish xhb.org or xhb.com with ifdef

how to distinguish xhb.org or xhb.com with ifdef

Postby dempty » Tue Sep 16, 2008 7:32 pm

Hi guys,

I started to migrate my system to work under xhb.com and sqlrdd, but I have to keep my old sql connection code, because for my clients who still using my old system version i must keep the support and i dont wanna separate my code for each version of xharbour.
So for do that i thought about distinguish in my code with ifdef...some think like this:

Code: Select all  Expand view
   #ifdef __HARBOUR_COM__
      //sqlrdd connection
   #else
      //old sql connection
   #endif


Someone Has any idea how to distinguish that ?

thanks!
regards,

Diego Imenes
dempty
 
Posts: 22
Joined: Mon May 19, 2008 8:54 pm

Re: how to distinguish xhb.org or xhb.com with ifdef

Postby Patrick Mast » Wed Sep 17, 2008 6:49 am

dempty wrote:I started to migrate my system to work under xhb.com and sqlrdd, but I have to keep my old sql connection code, because for my clients who still using my old system version i must keep the support and i dont wanna separate my code for each version of xharbour.
So for do that i thought about distinguish in my code with ifdef...some think like this:

Code: Select all  Expand view
   #ifdef __HARBOUR_COM__
      //sqlrdd connection
   #else
      //old sql connection
   #endif


Someone Has any idea how to distinguish that ?

thanks!

Sorry, there is no __XHARBOUR_COM as xHarbour Builder uses xHarbour's core engines. I would add a define of my own like this:

#define __SQLRDD__

Than:

#ifdef __SQLRDD__
...
#endif

Patrick
User avatar
Patrick Mast
 
Posts: 246
Joined: Sat Mar 03, 2007 8:42 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 74 guests