REM: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 25: Line 25:
{{PageSeeAlso}}
{{PageSeeAlso}}
* [[Apostrophe]]
* [[Apostrophe]]
* [[$DYNAMIC]], [[$STATIC]], [[$INCLUDE|$INCLUDE:]]
* [[$DYNAMIC]], [[$STATIC]], [[$INCLUDE]]




{{PageNavigation}}
{{PageNavigation}}

Revision as of 21:27, 2 February 2023

REM or an apostrophe is used for programmer remarks, comments or to stop the execution of program code.


Syntax

REM program comment or ignore code


Description

  • Comments cannot be read by QBasic correctly and may cause syntax and other errors without REM!
  • Instead of REM you can use the ' symbol which can be put anywhere.
  • Code can also be commented out for program testing purposes.
  • QBasic Metacommands such as $DYNAMIC and $INCLUDE require the use of REM or the apostrophe.


Example: Avoiding an END IF error.

REM This is a remark...
' This is also a remark...
IF a = 0 THEN REM (REM follows syntax rules)
IF a = 0 THEN '(apostrophe doesn't follow syntax rules, so use END IF after this)
END IF


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link