> How do you concatenate parts of a string constant into a single string > at compile time? > > For example, what I want to do is something like : > #define clschar 0x01 > #define tabchar 0x02 > > disp(clschar+tabchar); > > Obviously the compiler complains about this! > I can of course do disp("\x01\x02"); but that defeats the point of > trying to use meaningful names for control characters. static const char mystring[] = {clschar, tabchr, 't', 'e', 's', 't', 0}; disp(mystring); BillW -- http://www.piclist.com hint: PICList Posts must start with ONE topic: "[PIC]:","[SX]:","[AVR]:" =uP ONLY! "[EE]:","[OT]:" =Other "[BUY]:","[AD]:" =Ads