You can include descriptive or documentary comments in your JADE methods.
The types of comments that can be used in a method are as follows.
Comments beginning with double stroke character strings (//).
This type of comment continues only until the end of the line on which it appears.
Comments enclosed with stroke asterisk (/*) and asterisk stroke (*/) character strings.
This type of comment can span multiple lines.
In multiple-line comments, all text (including any double stroke (//) character string) that follows the stroke asterisk (/*) character string is ignored until the asterisk stroke (*/) character string is encountered.
The following example shows the use of single-line comments and embedded comments.
helloWorld(); vars count : Integer; begin // outputs "hello world" 10 times foreach count /* embedded comment */ in 1 to 10 do /* multiple line comment */ write "hello world"; endforeach; end;
You can fold multiple‑line block comments (that is, comments bounded by the /* and */ notation as well as multiple consecutive line comments that start with double stroke character strings (//)) in the editor pane, by selecting the Normal or Compact folding option on the Editor Options sheet of the Preferences dialog. By default, folding is not enabled. (For details, see "
When folding in the editor pane is enabled, you can expand and collapse multiple‑line block comments. A minus icon (-) is displayed next to the first comment line that can be folded up to remove the majority of the comment from view. JADE enables you to fold multiple‑block comments as follows.
A stroke asterisk (/*) and asterisk stroke (*/) comment block that stretches over more than one line, with the exception being a comment line started on the end of another line that can be folded for other reasons; for example:
if ... then /*
Multiple consecutive lines that start with double stroke character strings (//) comments where the // token is preceded only by spaces or tabs. If your folding option preference is set to:
Normal, the folding icon is displayed if three consecutive lines are in the format white space// ... (because folding the comments will show the first line underlined followed by the last comment line).
Compact, the folding icon is displayed if two consecutive lines are in the format white space// ... (because folding the comments will show only the first line underlined and not the last line).