A compiler program translates all the high-level source code into object code by a process known as 'compilation'. Compilation must be completed before the program can run. An analogy is translating text from English into another language and then giving the complete translated text to someone to speak.
An interpreter translates a high-level language program in a very different way. The interpreter runs directly on the target processor, usually analysing one source code statement at a time and running appropriate subroutines to give effect to, or 'execute' it.
An analogy for interpretation would be reading one line at a time to ensure that the listener understands each line (line by line)
ReplyDeleteGood Jacob!
ReplyDeleteWhere are your past paper questions?
ReplyDelete