User Tools

Site Tools

Translations of this page:

ugBASIC User Manual



   REM [comment]
   ' [comment]


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.


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


  • Atari (400/800)
  • Atari XL/XE
  • Commodore 128 (MOS 8502)
  • Commodore 128 (Zilog Z80)
  • Commodore 64
  • Commodore 64+REU
  • TRS-80 Color Computer
  • TRS-80 Color Computer 3
  • ColecoVision
  • Amstrad CPC 664
  • Dragon 32
  • Dragon 64
  • Thomson MO5
  • Thomson MO5
  • Olivetti Prodest PC128
  • Commodore PLUS/4
  • SEGA SC-3000
  • SEGA SG-1000
  • VG-5000
  • Commodore VIC-20
  • ZX Spectrum 48


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!