Follow Us

Header Ads

What is Interpreter || Meaning | Example | Advantages | Disadvantages ||

 Meaning of Interpreter

High-level languages need to be converted to machine code so that the computer can understand them. The interpreter converts the high-level language line-by-line to machine language. If there is an error in any of the lines it will display an error. The interpreter moves to the next line after the removal of the error. Interpreters were first used in 1952.

Need of Interpreter?


The first need is to translate source code from high-level language to machine language. However, for this purpose Compiler is also there. If the source code is huge, then it will take a long time to complete the execution process. Here, the Interpreter plays their role. They are designed to translate single instruction at a time and execute them immediately.




Advantages of Interpreter


1.) Execution is easy in interpreters because it reads the code line by line.

2.) It highlight the error message on the spot.

3.) Interpreter reads code line by line so you can stop the execution and edit the code at any point.

4.) Beneficialy in case of writing lengthy program.

Disadvantages of Interpreter


1.) The interpreter is often slower than the compiler as it reads, analyzes, and converts the code line by line.

2.) You need both source code and an interpreter to run the program.

3.) If you want to run the program on another computer, then that computer also needs a translator to be installed.


------------------------------------------------------------------------------------

Related Link


Post a Comment

0 Comments