Thanks to some comments from David Bolen, piper has been made more robust. I've also fiddled with the code and added some comments. http://www.scintilla.org/piper.zip Neil