Interpreter

From Computer History Wiki
Revision as of 05:21, 14 December 2018 by Jnc (talk | contribs) (+cat)
Jump to: navigation, search

An interpreter is a program which takes a program in the source code for a particular programming language, and examines it line by line, to work out what each line of the program is doing. For each line, instead of converting it to object code to perform the action specified, for execution later (as a compiler) would do), the interpreter takes the action indicated in that line there and then.

For example, the line 'a = b + c' would result in a compiler emitting a sequence of load, add and store instructions to achieve that; an interpreter would locate its current copy of the data items 'b' and 'c', add them together, and store the result in its copy of 'c'.