FutureBasic Logo

<<    Index    >> FutureBasic

rem   statement



Syntax
[statement] rem [remarks]
[statement] //[remarks]
[statement] /*[blockRemarks]*/ [statement]


Description
The rem statement (and its two variations) provide a way to insert comments (aka remarks) into the source code. Remarks/comments have absolutely no effect on how your program runs, but they help readers understand how your code works, which can be invaluable later.

rem or double-slash (//) create single-line comments; everything following it on the same line becomes a comment/remark.

The block comment tokens, "/*" and "*/", delineate comments spanning multiple lines. The "/*" indicates the beginning of a multiple line comment and "*/" indicates the end of a multiple line comment. The number of lines in a block comment is not limited.

Here is a multiple-line comment example:

/* This is the first line of remarks.
The remarks continue on this line.
This is the last line of remarks. */

Careful: block comments cannot be nested within another multiple line block comment. If the compiler encounters "*/" token in the middle of your remarks, it will assume the remarks end there. For example:

/* This is the first line of remarks.
We have /*accidentally*/
put a remark-closing token
in the middle of the remarks.
*/

When the compiler encounters this, it interprets the "*/" token following "accidentally" as the end of the remarks, and it attempts to compile the remainder of that line and the following line, leading to compile errors.


Note
You cannot put remarks after a data statement on the same line. Everything following the data keyword on the same line is considered part of the data statement.

See also
data