View in other colours (as comments) #if #endif optional code
Posted: Tue Nov 18, 2003 2:27 pm
Posibility to configure the editor to see in a graphic mode (different colours) the code areas that will be compiled and what will not.
I meant in 'c' code with sentences as #if (A==1)&&(B==0), #else, #endif.
In this case the editor has to recognise the constants A and B.
It will be very helpfull to design this kind of code when there are lots of sentences like this even nested.
Example:
#include "xxx.h";
#define A 1
#define B 0
#define C 1
#define D 0
void main(void)
{
#if (A==1)||(B==0) // In this case this is true
a=1; // This will be compiled, normal color
#if (C==1)&&(D==1) // In this case this is false
a=2; // This will not be compiled, comment color
#else // In this case this is true
a=3; // This will be compiled, normal color
#endif // End
a=4; // This will be compiled, normal color
#else // In this case this is false
a=5; // This will not be compiled, comment color
#endif // End
}
I meant in 'c' code with sentences as #if (A==1)&&(B==0), #else, #endif.
In this case the editor has to recognise the constants A and B.
It will be very helpfull to design this kind of code when there are lots of sentences like this even nested.
Example:
#include "xxx.h";
#define A 1
#define B 0
#define C 1
#define D 0
void main(void)
{
#if (A==1)||(B==0) // In this case this is true
a=1; // This will be compiled, normal color
#if (C==1)&&(D==1) // In this case this is false
a=2; // This will not be compiled, comment color
#else // In this case this is true
a=3; // This will be compiled, normal color
#endif // End
a=4; // This will be compiled, normal color
#else // In this case this is false
a=5; // This will not be compiled, comment color
#endif // End
}