Go to the first, previous, next, last section, table of contents.


Comments

TOM provides three basic comment syntaxes. The most basic kind of comment uses C syntax.

/* This is a plain, C-style comment.  */

The second kind of comments uses the // syntax as used in C++.

// This is a C++-style comment.

Unlike the C-style comments, the C++-style comments do have a meaning to the compiler: it will issue a warning about the comment. The intended use of // comments is to mark places in the code which need revisiting soon, since something is very wrong with it and the comment writer did not have the time or capabilities to fix it. The // comment replaces the common use of XXX, ???, and similar marks in regular comments used by a lot of programmers writing code, or people writing in general.

The third style of TOM comments are comments which can have a semantical meaning to programs manipulating TOM sources; they have no meaning to the compiler. These comments are called documentation comments, or documentation for short. Example:

<doc> This is a documentation comment.  </doc>

A documentation comment starts with a <foo> and ends with </foo>, where the foo can be any, even empty, combination of alphanumeric characters, including the underscore. Documentation comments with the same tag do not nest.


Go to the first, previous, next, last section, table of contents.