No problem, glad I could help. Borland does most includes automatically so I didn't have to explicitly include the math.h library. I probably should have done this but (like I said) this was a very quick and dirty solution but it does the job .