Hi Przemek,

This is Harbour .prg code.
                 ^^^^
So please refresh in your mind what && does in .prg code ;-)

That's why I was asking if I was missing something :/

I fully thought we replicated the C way of #defines,
and I'm a bit puzzled on this syntax :(

[ There are probably some reasons for this, but I fully
forgot about the whole topic. ]

If harbour is run (any version, I've now tried with 1.0.1 final BCC55),
it prints: 'DEF_A AND NOT DEF_B'

Use '.and.', f.e.:

#if defined( DEF_A ) .and. defined( DEF_B )
  #stdout "DEF_A and DEF_B defined"
#endif

In this case you can also use bit operation and '&' operator because
defined() returns 0 or 1

Okay, many thanks, I'll need this:
'#if defined( DEF_A ) .and. .not. defined( DEF_B )'

This seems to work okay.

Brgds,
Viktor

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to