FutureBasic Logo

<<    Index    >> FutureBasic

rem   statement

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

The rem statement (and its variations) provide a way for you to insert remarks into the source code which are ignored by the compiler. Remarks have absolutely no effect on how your program runs, but they can be very useful in helping readers to understand how your code works.
If you use the rem keyword, or the apostrophe (') or double-slash (//) token, everything following it on the same line is treated as a remark; therefore, it's not possible to put a non-remark statement after remarks on the same line.
The apostrophe and double-slash variations work identically to each other. In the FutureBasic Editor, remarks that begin with the apostrophe, the double-slash, or the "/*" token are automatically tabbed to the Remarks column of the Editor window if they're preceded by a statement. Remarks that begin with rem are not tabbed.
When you use the "/*" and "*/" tokens, the "/*" indicates the beginning of the remarks, and the "*/" indicates the end of remarks. Because it uses two tokens, this variation allows you to do some things you can't do with other variations. Specifically:

You can write remarks that span multiple lines, using only one pair of tokens. For example:

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

One disadvantage of using the "/*" and "*/" tokens is that you have to make sure you don't inadvertently include a "*/" token in the middle of your remarks. If you do, the compiler will assume that 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.

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