What is Interpreter

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

What is Interpreter ?

  1. Interpreter Takes Single instruction as input .
  2. No Intermediate Object Code is Generated
  3. Conditional Control Statements are Executes slower
  4. Memory Requirement is Less
  5. Every time higher level program is converted into lower level program
  6. Errors are displayed for every instruction interpreted (if any)
  7. The interpreter can immediately execute high-level programs, thus interpreters are sometimes used during the development of a program, when a programmer wants to add small sections at a time and test them quickly.
  8. In addition, interpreters are often used in education because they allow students to program interactively.

Examples of Programming Languages Using Interpreter :

Lisp

(defun convert ()
(format t "Enter Fahrenheit ")
  (LET (fahr)
    (SETQ fahr (read fahr))
    (APPEND '(celsisus is) (*(- fahr 32)(/ 5 9)) )
  )
)

BASIC

CLS
INPUT "Enter your name: ", Name$
IF Name$="Mike" THEN 
    PRINT "Go Away!"
ELSE
    PRINT "Hello, "; Name$; ".  How are you today?"
END IF

Interpreter in Programming Language
External Reference Links : Advantages and Disadvantages of Interpreter