BASIC Programming/Beginning BASIC/Documentation

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

In Basic, code is documented in one of two ways:

  • The REM statement
  • an Apostrophy: (')

Either of thse two options will result in a comment, which will treat the rest of the line as a comment.

As with most forms of code documentation, it needs to be used as programs grow larger and to help identify the purpose of a given section of code. It is unnecessary to document every individual line, but should give enough information such as the purpose of a given function or why a certain statement may be needed.