Prev | Current Page 96 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

Certainly, when working with one or more other developers on the same project,
commenting can save time and even money, by allowing others to understand what your code is doing.
Commenting in haXe follows the same format as C++ and Java, so developers of these languages should
be fully at home with the haXe conventions. There are two ways to comment in haXe, and both are
useful in different situations.
Block Commenting
Block commenting is more useful when larger amounts of information are needed in your code.
The block comment requires two lots of symbol groups: a forward slash and asterisk ( /* ) before your
comment block and an asterisk followed by a forward slash ( */ ) after the comment block. This way, the
compiler will continue to ignore your text, even across new lines, until the second symbol group is read.
/* This is a
comment block spanning
several lines */
The most common places for a comment block is at the head of each code file as a complete description
of the contained classes or at the beginning of a function as the function ??™ s description of usage.


Pages:
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108