D
Dietmar Kuehl
Pete said:#define XSTR(x) #x
#define STR(x) XSTR(x)
STR(INT_MIN)
But note that on some implementations, INT_MIN is defined more like
(-2147483657-1).
.... or as '(~0)'.
Pete said:#define XSTR(x) #x
#define STR(x) XSTR(x)
STR(INT_MIN)
But note that on some implementations, INT_MIN is defined more like
(-2147483657-1).
hmm..IIRC Its you that started us on this rocky road, further up this
thread. Now look where its ended up using nested macros!
OK How about this... just to initalise that value:
Pete said:How about this:
#if INT_MIN == 0xffff
const char *int_min = "0xffff";
#elif INT_MIN == 0xffffffff
const char *int_min = "0xffffffff";
#elif INT_MIN == 0xffffffffffffffff
const char *int_min = "0xffffffffffffffff";
#else
#error Don't know how to initialize int_min
#endif
Dietmar said:... or as '(~0)'.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.