v10.50 v10.55 Alpha v10.54 Alpha v10.53 Alpha v10.52 Alpha v10.51 Alpha
v10.50 v10.55 Alpha v10.54 Alpha v10.53 Alpha v10.52 Alpha v10.51 Alpha

Comments

Comments may be inserted into scripts as a way of documenting what the script does and how it does it. Comments are useful as a way to help others understand how a particular script works. Additionally, comments can be used as an aid in structuring the program.

Comments in CSL begin with a hash mark (#) and finish at the end of the line. The end of the line is indicated by pressing the Return or Enter key. Anything contained inside the comment delimiters is ignored by the compiler. Thus,

# x = 2;

is not considered part of the program. CSL supports only end-of-line comments, which means that comments can be used only at the end of a line or on their own line. It's not possible to place a comment in the middle of a line.

Writing a multi-line comment requires surrounding each line with the comment delimiters

# otherwise the compiler would try to interpret
# anything outside of the delimiters
# as part of the code.

The most common use of comments is to explain the purpose of the code immediately following the comment. For example:

# Add a profile if we got a server channel if(rfChannel != "Failure")
{
  result = SDPAddProfileServiceRecord(rfChannel, "ObjectPush");
  Trace("SDPAddProfileServiceRecord returned ", result, "\n");
}