??? 06/18/04 05:34 Read: times |
#72674 - RE: Static Local Variable Vs Global Variable Responding to: ???'s previous message |
Hello all,
Actually the problem goes like this, I have one error condition and I am suppose to report the error if it happens consicutively 7(N) times and if the error is not continous then I am suppose keep counting from start every time error occurs. So if the error is there once I want a variable to store the count, now if the error disappears then I dont need the counter to occupy the space also if the error occurs for more than 7 (N) times then I am suppose to report the error and reset the counter again I dont need the counter to occupy the space. So I want to make a variable which will be initialised when the error occurs and it is suppose to retain its value out of the function for some time i.e. if the error is consicutive then for 7 occurances then not needed. Please tell me how to do it, can mem allocation be a solution? i.e allocate a space and then free the space when not required? Sachin |
Topic | Author | Date |
Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
Not 8051-Specific | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable | 01/01/70 00:00 | |
RE: Static Local Variable Vs Global Variable![]() | 01/01/70 00:00 |