An html version of castling.cql.

Created by Gady Costeff and Lewis Stiller.

CQL 5.1
; castling occurs cql(input heijden.pgn) flipcolor move from Ke1 to c1 or g1

CQL 3.2
;;This file looks for all studies in which black or white castles in the main line ;; or in a variation (or both) ;; This is done simply by looking for positions such that the current move is ;; a move of a King from the e file to the c or g files (match :pgn heijden.pgn :output castle.pgn (position :movefrom [Kk]e? :moveto .[c?,g?] :variations ; look also in the variations ) )
After executing this with "> cql Castling.cql" there are 605 studies found in the Harold van der Heijden Database V 2015.
NB. When you see {MATCH} in the text, it means that cql has found the position asked for.

Below only 5 studies are presented:

Some more studies with castling contributed by Mario Garcia: