pic.programmer
Advanced Member level 3
- Joined
- Aug 19, 2015
- Messages
- 773
- Helped
- 141
- Reputation
- 284
- Reaction score
- 140
- Trophy points
- 43
- Activity points
- 7,531
You can do like this.
After returning from myFunction(), myInt will hold 128 as the value that is before second loop.
Code:
unsigned int myInt = 32;
unsigned int myFunction1(unsigned int myLoclInt) {
return myLocalInt * 2;
}
unsigned int myFunction2(unsigned int myLoclInt) {
return myLocalInt * 2;
}
void main() {
while(1) {
myInt = myFunction1(myFunction2(myInt));
}
}
After returning from myFunction(), myInt will hold 128 as the value that is before second loop.