[Harbour] Re: OFF: letodb suggestions
Alexander S.Kresin
alex at belacy.belgorod.su
Wed Jun 3 02:38:29 EDT 2009
Viktor Szakáts writes:
> Two macro solutions and better (automatic) replacements:
> ---
> #if ( defined( HARBOUR_VER_AFTER_101 ) )
> ->
> #if defined( __HARBOUR__ ) && __HARBOUR__ > 0x010100
> ---
>
> ---
> #elif defined( HARBOUR_VER_BEFORE_100 )
> ->
> #if ! defined( __HARBOUR__ )
> ---
>
The problem is that __HARBOUR__ was defined before 1.00, but it hadn't
a number, so with an old version
#if ! defined( __HARBOUR__ )
will always a FALSE and the
#if defined( __HARBOUR__ ) && __HARBOUR__ > 0x010100
will give the compile error.
> [ both work only after #including any Harbour headers and when
> __XHARBOUR__ is not defined. ]
>
> If this is implemented in the code, there is no need to do
> manual tricks with these macros
I don't like this manual tricks, too, but I simply didn't find a way
to do this with Harbour's __HARBOUR__, HB_VER_...
Regards, Alexander.
More information about the Harbour
mailing list