tks eric and CryptiqueGuy
On Jun 18, 6:28 pm, Eric Sosman <Eric.Sos...@sun.comwrote:
You cannot: A macro cannot generate a preprocessor
directive, even if the expansion resembles one.
#define BITX(i) ...something magical...
BITX(0)
Since the names of your macros are so descriptive ;-)
why not just use
really i use:
#define BIT(bit) (1UL<<(bit))
#define BIT0 BIT(0)
....
i agree that this is only cosmetic .....
i wanted:
- avoid repeat "i" in #define BITi BIT(i)
- use BITi that "looks" as a constant and not BIT(i) that locks as a
function
On Jun 18, 6:37 pm, CryptiqueGuy <SRRajesh1...@gmail.comwrote:
You can write the code, for generating such sequence #define
BIT0..etc. and print it in the required .c file.
This is the only possible solution I envisage.
yes, but i was looking for a language or "academic" solution, not for
avoid writting, at the end, there are only 32 lines to write (for my
case)
tks again to all!