¨

10.2.3 Comments

Comments have no effect on the behaviour of a program. In fact they are ignored when a Prolog term or program is read in. There are two forms of comment:

  1. A sequence of characters that begins with the symbol “/*” and ends with “*/” is treated as a comment.
  2. A sequence of characters that begins with the symbol “%” and ends with the end-of-line character (carriage return) is treated as a comment.

The first type of comment allows a comment to extend over several lines. The second type of comment is useful when commenting a single line. For example:


/*
** this is a comment
*/
% so is this
on stating the logic of the problem.og programs consist of facts and rules, which are referred to as clauses. A fact consists