Translators

Cards (5)

  • What do translator programs do?

    Takes code from a high level language (eg. Python) and makes it into machine code.
  • What do compilers do?
    Translate source code into object code.
  • Describe the features of a compiler.
    • compiler is only held in RAM for the time that it takes to translate source code into object code
    • translates lines one after the other but does not execute a line immediately after translation
    • once created, object code can run independently of development environment and translator software
    • if the object code file contains errors, the program will crash or cause unexpected output. Programmers must revisit source code, identify and correct errors and recompile
  • What do interpreters do?
    Translate source code directly into machine code.
  • Describe the features of an interpreter
    Each line is converted to machine code one at a time - executed as soon as it's translated.

    interpreter software present in main memory during execution of program and execution of every line

    won't translate the next line if there's an error - will stop instead and notify user

    useful tool to help programmers identify and fix errors - but can't determine actual error, can only indicate the line where something went wrong.