Several flags per compiler directive suggestion

mikroC, mikroBasic and mikroPascal PRO for Microchip’s 8-bit PIC MCUs.
Post Reply
Author
Message
Andrewz
Posts: 30
Joined: 07 Apr 2010 12:34
Location: Saint-Petersburg, Russia

Several flags per compiler directive suggestion

#1 Post by Andrewz » 26 Feb 2017 21:08

Hello.

Dear MikroElektronika developers. Have you ever thought of adding possibility to manage several flags per one directive?

Example:

I have two directive flags, declared in "*.pld" file which never used both in single project:
H_I2C_MANAGE
S_I2C_MANAGE
If one of these flags is set, common portion of code should be compiled. Now i have to include third flag I2C_MANAGE to tell compiler that this portion should be compiled!
I think it will be easier to write something like this:
#IFDEF (H_I2C_MANAGE or S_I2C_MANAGE) THEN
#ENDIF

or maybee

#IFDEF (H_I2C_MANAGE | S_I2C_MANAGE) THEN
#ENDIF

Best regards.

Andrew.

User avatar
lana.arsic
mikroElektronika team
Posts: 1715
Joined: 15 Jan 2016 12:50

Re: Several flags per compiler directive suggestion

#2 Post by lana.arsic » 27 Feb 2017 17:58

Hi Andrew,

Thank you for your suggestion,
I have forwarded it to our developers to take in consideration.

Kind regards,
Lana

Post Reply

Return to “PIC PRO Compilers”