Hi,
In my C code, I need to assign a lot of values. Like this: a1,a2,... are variables as char. v1,v2...,w1,w2...y1,y2 are constant (like 0x00, 0x01, ...etc)
if (i==0){ a1 = v1; a2 = v2; ... a50=v50; } else if (i==2){ a1 = w1; a2 = w2; ... a50=w50; } else if (i==3){ a1 = y1; a2 = y2; ... a50=y50; } else { }
I would like to minimize the code memory usage as possible. Which coding style or method is suggested to implement it ? Should I declare "array" or use " #define " ? Please kindly provide suggestions. Thanks a lot!
View all questions in Keil forum