| ||||||||
Technical Support Support Resources Product Information | GENERAL: CONVERTING MACRO PARAMETERS TO STRINGSInformation in this article applies to:
QUESTIONHow do I convert a constant passed to a #define macro into a text string? ANSWERPass the parameter to a stringizing macro as shown below: #define NUMBER B85800 // this can be defined in the command line #define VAL(str) #str #define TOSTRING(str) VAL(str) unsigned char part1[10] = TOSTRING (NUMBER); // generates "B85800" unsigned char part2[10] = VAL(NUMBER); // generates "NUMBER" FORUM THREADSThe following Discussion Forum threads may provide information related to this topic. Last Reviewed: Monday, March 19, 2001 | |||||||
| ||||||||