Computer science: compile-time errors vs logic errors

Self-tutoring about computer science: the tutor mentions some ideas about programming errors.

Writing programs in computer languages, some common types of errors are compile-time errors and logic errors.

A compile-time error is one that the compiler has noticed. In simple terms, the compiler is software that converts a newly-edited program from programming language into machine-runnable language. It will typically catch syntax errors, for instance, and refuse to create a runnable version of the program until they are corrected.

A logic error will typically manifest as unexpected behaviour while the program is running. Syntactically, said program is apparently correct, since the compiler has successfully processed it. Yet, there is a problem with its actual meaning: the code doesn’t mean what its programmer intended.

To a beginner, compile-time errors can be tiring. During intermediate and advanced stages of programming, however, logic errors come to be more worrying.

Source:

Deitel, Paul and Deitel, Harvey: C++ How To Program. Hoboken: Pearson Education Inc, 2017.

Jack of Oracle Tutoring by Jack and Diane, Campbell River, BC.

Leave a Reply