Using Comments in Your Methods

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.

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 "Maintaining Editor Options", in Chapter 2 of the JADE Development Environment User's Guide.)

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.