messagefilter has the same syntax as the
commentfilter except that the word
commentis replaced by the word
message. It consists of the word
messagefollowed by a list of arguments in parentheses. Each argument can be a quoted string, a set filter, a numericfilter, or a position filter.
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)
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.
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.
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.