Vaisakhan Ku
Junior Member level 1
Hi all,
Can anyone tell me the right method to declare global variables in MikroC for pic. I have declared variables at the beginning of the program.All variables are "int" are called multiple times from main function and updates their values within the function call. However, I cant get the updated values of these variables back to the main function. I checked if the values are getting updated, to my surprise they are getting updated inside the parenthesis of conditional statements where they are actually changing the values. It seems that these variables changes are not visible outside these functions.
can anyone tell me what all are the procedure to follow while declaring a global variable in MikroC :!!!! :-(
Can anyone tell me the right method to declare global variables in MikroC for pic. I have declared variables at the beginning of the program.All variables are "int" are called multiple times from main function and updates their values within the function call. However, I cant get the updated values of these variables back to the main function. I checked if the values are getting updated, to my surprise they are getting updated inside the parenthesis of conditional statements where they are actually changing the values. It seems that these variables changes are not visible outside these functions.
can anyone tell me what all are the procedure to follow while declaring a global variable in MikroC :!!!! :-(