Friday, March 11, 2011

Interpreters and Compilers

Translators can work in two different ways: as interpreters or compilers. Interpreters will translate one line of code at a time and generate error messages immediately. Compilers translate an entire file of code all at once, rather than line by line. The compiler will not generate error messages until all code has been translated. The original file or program that the programmer writes is called source code. Object code is the result of translation and is the machine language version of the original file. Cþþ is an example of a compiled language, while BASIC is an interpreted one.