I could not find an explanation for an observation given below.
1)When I declared bits like bit AM,fg_chat,pumpoff=0;pumpon=0,mode=0; bit PMP_flag = 1,buzzer=0,pumpon_flag=0; bit xmitempty,flash1,response_received=0,response_delayed=0,sms_flag; bit oht_red,oht_rg,glr_red,glr_rg;
my program data size was 74.3 bytes and code size 2179(there are many other variables also) but when I declared like bit AM,fg_chat,pumpoff=0;pumpon=0,mode=0, PMP_flag = 1,buzzer=0,pumpon_flag=0, xmitempty,flash1,response_received=0,response_delayed=0,sms_flag, oht_red,oht_rg,glr_red,glr_rg; the data size increased to 96.7 bytes and code size 2387. I use 89S52 uC.
Why this happens? What is difference between these?
I prefer to repeat the type for each variable, with one variable/line.
If I do "grep" for a variable, I want the printout to also show the data type.
Indeed - and the comment!
In fact, with some tools, when you mouse over a variable name, it will show the definition line - including any comment.