S
sh.vipin
how to make large macro paste the code as it is
Problem Explanation '--
For example in the program below
/* a.c - starts here */
#define DECL_VARS() \
unsigned int a0;\
unsigned int a1;\
unsigned int a2;\
unsigned int a3;
int main (){
DECL_VARS();
}
/* a.c -- ends here */
After macro processing, program becomes as follows.
int main (){
unsigned int a0; unsigned int a1; unsigned int a2; unsigned int a3;
}
PROBLEM: is when number of such variable declarations in a single
macro is too large, say a0 - a350, there will be parse error because
too many variable declarations in same line.
SOLUTION : ??
Problem Explanation '--
For example in the program below
/* a.c - starts here */
#define DECL_VARS() \
unsigned int a0;\
unsigned int a1;\
unsigned int a2;\
unsigned int a3;
int main (){
DECL_VARS();
}
/* a.c -- ends here */
After macro processing, program becomes as follows.
int main (){
unsigned int a0; unsigned int a1; unsigned int a2; unsigned int a3;
}
PROBLEM: is when number of such variable declarations in a single
macro is too large, say a0 - a350, there will be parse error because
too many variable declarations in same line.
SOLUTION : ??