Place a single-line comment in a program file


      NOTE [<commentText>]


<commentText> is a string of characters placed after the comment indicator.


NOTE is command synonym for the single-line comment indicator (*). All characters after NOTE are ignored until the Harbour compiler encounters an end of line (carriage return/line feed). This means a single-line comment cannot be continued with the semicolon (;) onto a new line.

If you need a multi-line or inline comment, begin the comment block with a slash-asterisk (/*) symbol and end the comment block with an asterisk-slash (*/) symbol. If you need to comment out a block of code, use the conditional compilation directives #ifdef…#endif instead of multiline comments. This is important since nested comments are illegal.

NOTE is a compatibility command and therefore not recommended. It is superseded by the C-style comment symbols slash-asterisk (/*) and asterisk-slash (*/), as well as the double-slash (//). It is also superseded by the dBASE-style comment symbols, asterisk (*) and the double-ampersand (&&).

For a complete discussion on comment indicators, refer to the “Basic Concepts” chapter.


      .  These examples show the various comment symbols supported by
         Harbour :
      // This is a comment
      /* This is a comment */
      * This is a comment
      && This is a comment
      NOTE This is a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s