A Compiler Translates a program into binary all at once, ahead of time. Interpreters translate each line of code, each time that line of code is to be executed.
Obviously, compiled code runs faster. You can distribute compiled code, without giving away the source, giving away how your program works.
It's the translation process, not the language itself we're talking about here.
There's also a third way. The source code can be translated into a pseudo-code, (p-code) which can remain processor neutral. The p-code is then interpreted at run time, but this is more efficient that interpreting the original source code.
2006-07-06 13:34:51
·
answer #1
·
answered by Jay S 5
·
1⤊
0⤋
Compiled language like C means that u must write the code and save it into a file. Then u submit the file to the compiler (C program). It will read ur file and locate the corresponding items from the C libraries and construct a binary (executable) code into a new file. The new file that is created is all ur code that was translated into binary and added to from the C libraries so that the binary can be processed directly by the computer.
An interpreted language like QBasic, again is authored and stored into a file too. Only as I type my QBasic codes into the file each line is scanned by the editor used to create the file and checked for it's syntax (following of the rules) and u must have that correct or it will beep and keep u fixing until it has a valid command. Once that code is typed the u submit it to RUN. The run will begin at the top of ur code and process one line at a time from top to bottom. One line is processed prior to the next running. Interpreted languages are normally much slower than that of the compiled languages.
2006-07-06 21:33:48
·
answer #2
·
answered by comp_instr 3
·
0⤊
0⤋
Programming languages generally fall into one of two categories: Compiled or Interpreted. With a compiled language, code you enter is reduced to a set of machine-specific instructions before being saved as an executable file. With interpreted languages, the code is saved in the same format that you entered. Compiled programs generally run faster than interpreted ones because interpreted programs must be reduced to machine instructions at runtime. However, with an interpreted language you can do things that cannot be done in a compiled language. For example, interpreted programs can modify themselves by adding or changing functions at runtime. It is also usually easier to develop applications in an interpreted environment because you don't have to recompile your application each time you want to test a small section.
2006-07-06 20:29:11
·
answer #3
·
answered by dinuksw 3
·
0⤊
0⤋
Compiled Language:
A computer language turned by a computer into binary form usable by a computer from its original source code only once, and then run in binary format thereafter. Usually somewhat more difficult to work with than an interpreted language, but generally much faster.
Interpreted Language
A computer language turned into a binary form usable by a computer from its original source code by a computer each time it is run. An interpreted language is somewhat easier to work with than a compiled one, but tends to be slower. See also Java, JavaScript.
2006-07-06 20:32:51
·
answer #4
·
answered by chris19742000 2
·
0⤊
0⤋
compiler means. set of instructions is parsed and checked for bugs and then excutes the errors at last after compiling whole program. after compilation . obj code is created.
interpreter means line by line execution. compilation process is takes place for each and every line .
2006-07-06 20:29:13
·
answer #5
·
answered by kannan_poem1984 2
·
0⤊
0⤋