Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
user:embedded_c_code_doesn_t_have_to_be_ugly [2020/05/11 18:47] – [6. Code blocks' nesting] Igor Yefmov | user:embedded_c_code_doesn_t_have_to_be_ugly [2020/05/11 18:55] – [7. Code comments] Igor Yefmov | ||
---|---|---|---|
Line 267: | Line 267: | ||
Speaking of stack depth: partitioning your code into smaller functions may indeed //reduce// your stack requirement as you won't be needing to allocate every-single-variable-ever-used-in-any-branch in one chunk, but instead only use up as much stack as needed for each individual function. | Speaking of stack depth: partitioning your code into smaller functions may indeed //reduce// your stack requirement as you won't be needing to allocate every-single-variable-ever-used-in-any-branch in one chunk, but instead only use up as much stack as needed for each individual function. | ||
==== 7. Code comments ==== | ==== 7. Code comments ==== | ||
+ | <code C> | ||
+ | int i = 1; // set i to 1 | ||
+ | |||
+ | i++; // increment i by 1</ | ||
+ | |||
+ | The comments above are utterly useless. Not only they don't anything to what is already expressed in the code((which is bad enough on its own)), there' |