Re: Correcting errors in Delphi Code

Posted by Jenny on November 08, 2005

In Reply to: Sorting Errors in Code posted by Graham J Hadlington on November 03, 2005

: I am new to Delphi and programming too. Can anyone recommend software that can correct errors in Delphi code please?

Sorry, but software that "corrects" errors in Delphi code simply doesn't exist. How could the software know what you want to achieve?

But often, Delphi itself already does a great job in pointing out where the problem is, if it is only a syntaxis error.

There are two types of errors:

- design time errors: caused by bad syntaxis or typing errors. The Delphi debugging system will tell you in detail what is wrong, and it doesn't compile your code at all. Of course, you have to know what the error messages mean, and you can get this only by experience. Or by asking in a forum, mentioning the exact error message and (part of) the offending code ;)

- run time errors: in 99% of the cases, these are caused by errors in your logic behind the program. Solution: trial and error, I'm afraid. And the same advice as above: mention the exact error message if you ask a question.

If the code doesn't work, make a backup of it and remove parts from your source code until there are no more error messages. This simple principle is often forgotten, even by experienced programmers!

Good luck,

Related Articles and Replies

DelphiLand Forum