On Thursday, 14 February 2013 at 13:14:47 UTC, Gopan wrote:
Dear Friends,
I have a callback function which will be called back so many
times, say at every second for a week.
void TimerCallback(int number)
{
Statement_1;
if(number == MY_MAGIC_NUMBER)
{
/*
I have been waiting for this so far. Now, I have got
want I want.
So, I don't want to execute the the above if condition
for further callbacks.
IS THERE ANY TECHNIQUE by which I can say HERE that,
from Statement_1, the control can directly go to
Statement_3,
skipping the evaluation of the above if condition?
If it is not possible, is it a limitation at the
micro-processor architecture level?
*/
}
Statement_3;
}
Thank you.
Maybe you can write 2 different callbacks, one with if, one
without and switch between them. Maybe with a compile-time code
generation to avoid code repetitions... Just for a int comparison
or is it a different long operation?