I incorporated this code in an iPhone app, ChessNotePad. In addition to having this code create PGN for me, I was able to load games move by move, and verify whether or not a proposed move was legal or not (this took some effort). I no longer support ChessNotePad and frankly don't recall how I used the library, but I did add two features to the original: import and export of both NAG codes and comments. If you want to use this code, it offers a lot, but demands a lot. There are no comments, the functions all have similar looking names, and the original documentation leaves a lot to be desired. The only want to really learn it is play around with it, add print statements, etc. I found that the vast majority of PGN files on the web, on the well known web sites, are faulty (I actually tracked down the apparent discrepancy to verify that they were in fact violations).