Thank you for your replies. Earlier on in the code I had forgotten to convert my PDL version of Break to Return in some IF statements and of course it failed to compile., This particular one I had missed in the conversion process and when spotted I'd already tested the code, which was why I was surprised it worked as the compiler itself has many quirks in it. Colin -- cdb, colin@btech-online.co.uk on 27/06/2009 Web presence: www.btech-online.co.uk Hosted by: www.1and1.co.uk/?k_id=7988359 -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist