Difference between revisions of "Apostrophe"
m (Delete unrelated See Also entry)
(Reword and normalise with REM)
|(One intermediate revision by the same user not shown)|
|Line 1:||Line 1:|
The '''apostrophe''' to the to
* [[REM]] can also be used to a line.
* [[REM]] can also be used to
* QBasic [[metacommand]]s must be either or [].
* QBasic [[
|Line 20:||Line 25:|
Latest revision as of 11:35, 17 February 2021
The apostrophe allows explanatory comments, or remarks, to be inserted in a program. These may be included anywhere in the source code and extend to the end of the line. Comments are ignored when the program is run.
- REM can also be used to insert comments but may only be used as the last, or only, statement on a line.
- QBasic metacommands like $INCLUDE must be included in a comment using either REM or '.
- Apostrophe comments, unavailable in earlier dialects of the BASIC language, are now generally favored over REM statements for their greater flexibility.
- Comments are also useful for disabling code for program testing and debugging purposes.
COLOR 11: PRINT "Print this...." ' PRINT "Don't print this program comment!"