3.1.4.2 Interpreter

3.1.4.2 Interpreter 

An interpreter does a similar job but in a different style. The interpreter (as the name implies) translates one statement at a time, and if error-free, executes it. This continues till the last statement. Thus an interpreter translates and executes the first instruction before it goes to the second, while a compiler translates the whole programme before execution.

The major differences between the two are:

Error correction (called debugging ) is much simpler in the case of the interpreter because it is done in stages. The compiler produces an error list for the entire programme at the end.

Interpreters take more time for the execution of a programme compared to compilers because a statement has to be translated every time it is read.

Last modified: Friday, 22 June 2012, 6:55 AM