Interpreters and Compilers

Download excellent quality study note and ebooks of amie section a on Computing and Informatics (AD 303) in pdf,ppt,doc format
Post Reply
raviraj
Posts: 14
Joined: Sun Aug 26, 2012 11:53 am

Interpreters and Compilers

Post by raviraj »

An interpreter translates and executes a program as it reads it, turning the program
instructions, or source code, directly into actions. A compiler translates source code into
an intermediary form. This step is called compiling, and it produces an object file. A
linking application called a linker runs after the compiler and combines the object file
into an executable program containing machine code that can directly be run on the
processor.

Because interpreters read the source code as it is written and execute the code on the
spot, interpreters can be easier for the programmer to work with. Today, most interpreted
programs are referred to as scripts, and the interpreter itself is often called a script
engine.

Compilers introduce the extra steps of compiling the source code (which is readable by
humans) into object code (which is readable by machines). This extra step might seem
inconvenient, but compiled programs run very fast because the time-consuming task of
translating the source code into machine language has already been done once, at compile
time. Because the translation is already done, it is not required when you execute the
program.

Another advantage of compiled languages such as C++ is that you can distribute the executable
program to people who don’t have the compiler. With an interpreted language,
you must have the interpreter installed to run the program on any computer.

Some high-level languages, such as Visual Basic 6, call the interpreter the runtime
library. Other languages, such as C#, Visual Basic .NET, and Java have another component,
referred to as a virtual machine (VM) or a runtime. The VM is also an interpreter.
However, it is not a source code interpreter that translates human-readable language into
computer-dependent machine code. Rather, it interprets and executes a compiled
computer-independent virtual machine language or intermediary language. These
languages, therefore, still feature a compiler or a compilation step during which the
source code written by a programmer is first translated; that is, compiled into content
that can be interpreted by the virtual machine or runtime library.
C++ is typically a compiled language, although there are some C++ interpreters. Like
many compiled languages, C++ has a reputation for producing fast and powerful programs.

Interpreters and Compilers

Sponsor

Sponsor
 

subham
Site Admin
Site Admin
Posts: 955
Joined: Sun Apr 29, 2012 11:23 pm

Re: Interpreters and Compilers

Post by subham »

nice note raviraj keep go on it will help all thanks..............................
Post Reply

Return to “Computing and Informatics (AD 303)”