Table of Contents

ugBASIC User Manual

REM

SYNTAX

   REM [comment]
   ' [comment]

PURPOSE

The REM keyword is used to include explanatory remarks in the source code of a program. In the text of any comment you want to include, that is optional, a space is required between the REM keyword and comment.

You can put a REM statement alone on a line, or you can put it on a line following another statement . The REM statement must be the last statement on the line. If it follows another statement, the REM must be separated from that statement by a colon (:).

You can use a single quotation mark (') instead of REM. This is true whether your comment follows another statement on the same line or sits alone on a line. However, you cannot continue a REM statement by using a line-continuation sequence (_). This means that, for a multiple-line comment, you need to use as many REMs statements as the lines you comment.

EXAMPLE

  REM this is a comment
  ' and this is a comment
  PRINT "ok": REM I am printing ok

AVAILABLE ON

ANY PROBLEM?

If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please open an issue for this keyword on GitHub. Thank you!

POWERED BY