2 ms·
i think comments can be very useful. for example, look at the c function strlen: int strlen( char * s ); the following comment pretty much describes what it d
by zabzonk 4y ago
i think comments can be very useful. for example, look at the c function strlen:
int strlen( char * s );
the following comment pretty much describes what it does:
- if passed a null-terminated string, returns the number of characters in the string, excluding the terminator
- if passed a null pointer, or an incorrectly terminated string, behaviour is undefined
these are the kind of comments i like to see