How interpreter works | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

How interpreter works

23rd Mar 2019, 11:46 AM
balaganesh
balaganesh - avatar
4 Answers
+ 8
Interpreter translates high level language into machine language. But it's working process is different from compiler. A compiler scan the whole program first. Then translates it. On the other hand, interpreter scans a line, translates it and moves to the next. Interpreter starts working immediately after running the program but does not run faster than compiler. Compiler works first but takes time to start the program. Interpreter can work on low memory.
23rd Mar 2019, 11:57 AM
Adnan Zawad Toky
Adnan Zawad Toky - avatar
+ 4
An interpreter is a type of converter that converts high-level language "line by line". It is different from a compiler as a compiler does it altogether. Another main difference is that compiler displays all the errors at once whereas an interpreter stops interpretation as soon as it spots an error and would not execute after that until the erroe is resolved.
23rd Mar 2019, 1:42 PM
Anshumaan Mishra
+ 2
Thanks
23rd Mar 2019, 11:54 AM
balaganesh
balaganesh - avatar
+ 2
interpreter checks our code line by line and it throw back the errors on the command prompt
23rd Mar 2019, 6:27 PM
Kalpana Reddy
Kalpana Reddy - avatar