Hi Enrico,

It doesn't work also. The problem
is not with the .AND. as it seems, but
rather that >= will just fail if the
macro doesn't exist.

And why not

FUNCTION MAIN()

  #if defined(HELLO)
      IF HELLO >= 0x0100
          ? HELLO
      ENDIF
  #endif

Because the protected code parts may use functions
that don't exist depending on the value of HELLO
(which happens to be an external library version
number). In my specific case where this popped up,
your solution could work, but it'd need to "blend"
the two branches together (LOCAL declarations f.e.),
which I'd like to avoid as one branch will soon be
dumped anyway. [ BTW, it would be very nice to be
able to have 'LOCAL/STATIC' keyword inside any code.
but that's a different topic. ]

So, I can solve this in other ways, and it's not a
showstopper, I was just expecting to work like in C.
Regardless of C resemblance however, the comparison
#if operators are a bit limited if there is no way to
handle the case of a missing macro. Maybe there is a
way to fix this it's not colliding with other
requirements.

Brgds,
Viktor

_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to