Why Include Comments?

Although some programmers see no value in adding comments to their code, the professional Visual Basic programmer employs a higher standard in his or her programs. Some of the practical reasons for incorporating comment documentation in your code include the following.

Description of Purpose

You always add a subroutine or function to a program with a purpose in mind. Remarks allow you to express that purpose to anyone who wishes to read your thoughts. Comments give you a chance to justify the code you wrote, even if the justification is directed only at your own sense of discipline.

Readability

Comments enhance the readability of your code by providing an alternate method, apart from the code itself, to express the logic ...

Get Visual Basic® Style Guide, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.