Rem (statement)
The REM statement identifies all remaining data on a line as a non-executing remark, or comment. An exclamation point that follows the line number or statement serves the same purpose. (Except that the exclamation point may be followed with a colon !: and another executable statement).
Comments and Examples
REM statements help to make programs more readable. You can use them to make a single comment at the end of a line, to identify and separate sections of a program, or to insert blank lines for improved legibility.
In the following example, REM statements identify the title and author of a program:
00010 REM ***** A U T O F O R M A T 00020 REM ***** by Andrea Schulton
The exclamation point/colon sequence allows you to insert comments between statements. It also causes multiple statements to list on separate lines for easier reading. This line of program code:
00600 LET LM=25 ! indent left margin for teacher comments !: LET RM=70 !
standard right margin !: LET TM=6 : LET BM=7 would list like this:
00600 LET LM=25 ! indent left margin for teacher comments !: LET RM=70 ! standard right margin !: LET TM=6 : LET BM=7
It is not necessary to include a remark after the REM keyword or exclamation point; you can insert blank lines in your program by leaving this space open.
Syntax
{REM [.] [<comment>]}|{! [.] [<comment>][!: <statement>]
Default
1.) Display comment as specified by STYLE COMMENTS specification. 2.) Remainder of line is blank. 3.) Remainder of comment is blank. 4.) Do not execute a new statement from this line.
Parameters
The REM statement has no required parameters. You may type REM or ! and leave the rest of the line blank if you wish. The period (.) parameter may be used to prevent STYLE COMMENTS specifications from affecting a particular remark. It must be specified immediately after the REM keyword or exclamation point. The "remark" parameter can consist of any combination of characters. The remark may be any length, as long as the total length of the line does not exceed 800 characters.
When using the exclamation point instead of the REM keyword, you may end the remark and specify the next statement to be executed with the "!: statement" parameter.
Technical Considerations
1.) REM and ! respect both uppercase and lowercase characters. All remarks remain in the same form as they are typed unless STYLE COMMENTS is specified. 2.) When ! is inserted at the beginning of a multiple- statement line (for example, to deactivate a line for debugging), statements that are separated by !: will still be executed.