Welcome to PGD Polar... I only use FreePascal and might be able to help. Though going through you're code I don't see anything wrong. Like Athena said, it's basic pascal. Please tell us what error messages did the compiler return.