BASIC Programming/Beginning BASIC/Documentation
From Wikibooks, open books for an open world
|
|
A reader has identified this page or section as an undeveloped draft or outline. You can help to develop the work, or you can ask for assistance in the project room. |
In Basic, code is documented in one of two ways:
- The REM statement
- an Apostrophe: (')
Either of these 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.