Comments in ST

Syntax
(* comment *)
/* comment */
// comment

Meaning

→comment with one or more lines, at any position in the ST-code where spaces are allowed
It is not allowed to insert comments within →keywords, →delimiters or →identifiers. The delimiters depend on the chosen comment type, e.g.(* and *).

If you enter a comment before a declared element, this comment is shown as tooltip for a documentation of the element, if you hover over the used element. See "How to create a tooltip for the documentation of an ST-element?" for details.

Example
(* This is an example for a comment. The comment may have one or more lines. *)
/* This is another example for a comment. The comment may have one or more lines. This comment type is using other delimiters - in contrast to the above comment type. */
// an example for a comment with one line

How to toggle // comments:

  1. Select the code.

  2. Open the context menu in the ST editor and select Toggle Comment.