REM
For single line comment (as per any BASIC implementation)
REM This line will be ignored during program execution.
For multi-line comment
REM Sometimes, we want a comment _
to span multiple lines. The _
"continuation" mark _
(space followed by underscore) _
is really good for this.
Single Quote
' Although the single-quote is also an option for comments
' It is best for short comments, especially those that are added at the end of, and on the same line as, code.
PRINT "Hello World!" ' The single quote is very convenient for this
PRINT "Hello World!" : REM We can use REM instead of a single quote, but it does require a colon to separate the "REM" statement from the previous statement
HTML Comment (Start and End tags)
<!-- BASIC Anywhere Machine being a browser-based implementation of BASIC,
we can take advantage of the HTML way of adding comments if and when
compatibility with other BASIC implementations is of no concern -->
PLEASE NOTE: the HTML Comment is now only useful while the BASIC program exists in BASIC Anywhere Machine. Upon export of the program, all HTML Comments will be removed.
ReplyDeleteSo such a comment is only useful for "private/internal" comments, as in "pre-publishing" comments.