Comments in BCX

Comments can be included in BCX code by using the apostrophe operator('), the REM statement or the $COMMENT directive.

' Apostrophe operator

The apostrophe ' is used to indicate that the text following the apostrophe is a remark, comment, note or code that is not to be translated.

Example:

 ' This remark is prepended by an apostrophe.

REM statement

REM is used to indicate that the text following the REM is a remark, comment, note or code that is not to be translated.

Example:

 REM This remark is prepended by REM.

REM and ' can be separated from from a statement with a colon provided a there is a space between the last statement and colon. The colon is not necessary.


  Valid:
 
 PRINT :REM my comment
 PRINT :' my comment
 PRINT'my comment
 PRINT REM my comment
 
  Invalid:
 
 PRINT:REM my comment
 PRINT:'my comment

$COMMENT directive

$COMMENT allows the embedding of remarks, comments, and notes without using an apostrophe or REM at the beginning of each line. Remarks are placed between $COMMENT directives.


 Syntax:
 
 $COMMENT
  ********************************************
  *   The BCX translator $COMMENT directive  *
  *    allows non-code comments between two  *
  *             $COMMENT directives.         *
  ********************************************
 $COMMENT

Example:

 
 DIM Welcome$
 Welcome$ = "Hello BCX Lovers"

 $COMMENT
  ********************************************
  *  Oh, and did I mention that you can use  *
  *  them liberally throughout your program? *
  ********************************************
 $COMMENT

 CLS
 PRINT Welcome$