Adding comments to an XpressDox template

Adding comments to a complicated template, or a complicated piece of code, is always a good idea. It helps for the maintenance of templates, for readability, and for reminding yourself why you did things a certain way. It is also useful when another template author in the firm needs to make changes to a template.

 

Comments can be added to a template in two ways:

 

The Comment command

The Comment command exists only in the template and does not print anywhere on the document.

«Comment(The next few lines will produce a list of the children and their ages.  This is necessary for clarification purposes.)»

 

Place text inside commands

Include the comment text in the command itself.  (This applies to commands as against functions. More information on commands and functions is available at Commands and Functions).

This is done by typing the comment after the closing parenthesis of the command, e.g.:

«ForEach(Child[Age < 12]) produce a list of the children aged below 12»