Hello all ... i was just wondering if this migth be a rigth/wrong
perhaps bad practice/pron to errors way to use a #define macro.
i have this program that scans/calculates arrays in five different
functions. They all use the same for loop because the arrays are
all the same size. So instead of having the for loop in each function,
i would define it as a mac,
#define LOOP for(count = 0;count < MAXSIZE;count++)
and use it in a function,
int test(int *array1, int *array2)
{
int count;
LOOP /*array1 loop*/
{
/* code */
}
LOOP /*array2 loop*/
{
/* code */
}
return 0;
}
could this cause problems ???