June 2025
Intermediate to advanced
1093 pages
33h 24m
English
Consider automatically generating documentation from comments. This makes it easier to keep code and documentation synchronized. There are special tools for this, such as Doxygen (http://www.doxygen.org), among many others. Such generated comments then have a special format and only supplement your other comments; they do not replace them:
/** Calculate Fibonnacci number. * @param n -- input number, must be greater or equal to 0 * @return the n-th fibonacci number */// Mathematically: fib(n) = { 0: 0, 1:1, else: fib(n-1)+fib(n-2) }// Recursive and therefore slow implementation.// To speed things up, the recursion can be replaced by a table with a loop.// From an 'n' of about 50, 'unsigned' could overflow.unsigned fib(unsigned ...
Read now
Unlock full access