Comments

The sample program you wrote is a very simple example of code—there is nothing complicated going on. However, a real-life program is normally more complicated and lives a longer life than a sample program in a book for learning programming. The people developing these programs have realized very early that a mechanism to add notes and comments about what certain pieces of code do is an absolute must—from the human perspective. These comments are required as an additional explanation for what a given piece of code does. They are useful to somebody who uses the code to extend (improve) it or is just reading it trying to understand what different parts of it are doing, or as input for a documentation generation tool.

In programming, these ...

Get Visual Basic® .NET by Example 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.