Can I use static key word in user function?
FUNC char StateMachine(void) { static unsigned char _state; switch(_state) { case 0: ... } }
Affirmstive
Q 4 U
Can you find a beginners guide to C ?
Thanks for your reply. But the key word static is used in debug script for debugging within the µVision Debugger, not in source code. Do you notice the word FUNC in function definition?
That's what happens when you post questions with missing relevant detail!
Did you bother to try it in your user function?
I tried but fail:
static unsigned char _state; ___________^ *** error 10, line 594: Syntax error *** Function creation aborted due to syntax errors
Do you think you now have enough evidence to determine whether the static keyword is supported in that situation?
Q 4 U I doubt the OP is willing to wait till quarter 4 for an answer
View all questions in Keil forum