message

The message filter has the same syntax as the comment filter except that the word comment is replaced by the word message. It consists of the word message followed by a list of arguments in parentheses. Each argument can be a quoted string, a filter, or the keyword currenttransform. If there is only one argument, the enclosing parentheses can be omitted.

The currenttransform argument has the same effect as in comment, representing a string that represents the current transform.

  message ("The value of x is: " x)
  message ("The number of black pieces is: " #a)
  message ("The checking pieces are: " A attacks k)
  message ("The initial position is: " position 0)

The message filter converts its arguments to a string just like comment does. However, instead of including this string as an annotation in the PGN file, the message filter writes the string to the standard output. The string is prefaced by an indication of the current move number, the side to move, the game number. If the currentposition is in a variation, the positionid of the current position is also output.

The message filter is primarily intended for use in debugging: it outputs its message as soon as the filter is invoked. This can be especially helpful when a game is unexpectedly not being matched at all by CQL: the comment filter is hard to use in this situation since the comments won't even be printed.

Because message can often output a lot of data, when debugging it is often helpful to first narrow down the problematic game either to its own file or to a specific game number. Then run cql just on that game number using the --gamenumber command line option.