
In message 47F3F98010FF784EBEE6526EAAB078D1024F8672@tq-mailsrv.tq-net.de you wrote:
Is it OK for comment lines to exceed 80 columns in general? I'm quite
It should be avoided, but please do't just reformat text because of that, espeially when the result is more ugly.
often not sure, where to place comments correctly: At the end of a coded line, although the 80 column limit is exceeded? Or better in the line before? Or at the end of the coded line, but with the comment splittet to several lines to not exceed 80 collums:
There is no genral rule.
#define CFG_ENV_SECT_SIZE 0x40000 /* Total Size of Environment Sector */
That should always be avoided. There are some broken compilers around which will see an unclosed comment here... ALways make sure to terminate the comment on the same line in #define's:
#define CFG_ENV_SECT_SIZE 0x40000 /* Total Size of */ /* Environment Sector */
Now think of it - is this readable? Not good. And what if you need to edit it? A nightmare. So it's probably better to but the commend in a line above the #define.
Best regards,
Wolfgang Denk