deference between Compiler & interpretor
can you explain what is the defrence between these two.I know only these facts.
These 2 are translators & compiler makes source program in to object program then in to execution.But interpreter makes source program in to object program.
*compiler
source program------------>object program------------>exe
*interpretor
source program------------>object program
then what is the use of interpretor...?It is like a half journey.
(friends I post my question according to my knowledge.I am a self learner.Soo my knowledge is not a proper one.If there are any wrong idea in my post please explain them..It may be a great help for me.)
deferance between Compiler & interpretor
Re: deferance between Compiler & interpretor
Programmers usually write programs in high level code which the CPU cannot execute. So this source code has to be converted into machine code. This conversion is done by a compiler or an interpreter. A compiler makes the conversion just once, while an interpreter typically converts it every time a program is executed (or in some languages like early versions of BASIC, every time a single instruction is executed).
Compiler
A compiler is a computer program (or set of programs) that transforms source code written in a computer language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program.
The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code).
Interpreter
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language. An interpreter may be a program that either
Compiler
A compiler is a computer program (or set of programs) that transforms source code written in a computer language (the source language) into another computer language (the target language, often having a binary form known as object code). The most common reason for wanting to transform source code is to create an executable program.
The name "compiler" is primarily used for programs that translate source code from a high-level programming language to a lower level language (e.g., assembly language or machine code).
Interpreter
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language. An interpreter may be a program that either
- executes the source code directly
- translates source code into some efficient intermediate representation (code) and immediately executes this
- explicitly executes stored precompiled code made by a compiler which is part of the interpreter system