Small-C
Small-C copied to clipboard
Small-C: Support for static local variables
Static local variables
Variables declared as static inside a function are statically allocated, thus keep their memory cell throughout all program execution, while having the same scope of visibility as automatic local variables (auto and register), meaning remain local to the function. Hence whatever values the function puts into its static local variables during one call will still be present when the function is called again.
- [ ] Blocked by needing local variable initialization #7. Once this is done ...
- [ ] These variables should have a unique name based on function and local name (nice to have longer variable names!)
- [ ] Initialize these variables at start up, in global area but with local scope.