Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DSDP - Mobile Tools for Java (MTJ) » Boolean clauses in preprocessor directives
Boolean clauses in preprocessor directives [message #576007] Thu, 20 August 2009 06:49 Go to next message
David Lucena is currently offline David Lucena
Messages: 74
Registered: August 2009
Member
I am trying to use the preprocessor like the C preprocessor, but I fail.

It is possible to do things like


//#ifdef DEFINED_VALUE && (DEFINED_VALUE == 2)
//#else
//#endif

If the answer is yes, could someone point me how?

If the answer is no, is there plannings to support it?


Thank you.
Re: Boolean clauses in preprocessor directives [message #576042 is a reply to message #576007] Thu, 20 August 2009 07:05 Go to previous message
David Lucena is currently offline David Lucena
Messages: 74
Registered: August 2009
Member
I think i found a workaround.


//#if (DEFINED_VALUE) && (DEFINED_VALUE == 2)
//#else
//#endif


The code above seems to work. Is that the correct way of doing it?
Previous Topic:Problems with Motorola device
Next Topic:Boolean clauses in preprocessor directives
Goto Forum:
  


Current Time: Sun Apr 20 18:05:45 EDT 2014

Powered by FUDForum. Page generated in 0.01645 seconds