CrazyEngineers Forum

******************************************
Welcome To CrazyEngineers (CE) – an online community of engineers from all over the world! With the younger CEan at 84 and the youngest at 16, CE boasts of professional engineers, students, professors, entrepreneurs, CEOs, geeks & nerds. We exchange innovative ideas, share knowledge, help each other and expand our worldwide network of engineers! You need not have a formal degree in engineering to be a part of CrazyEngineers! Need we say more?
Join CE! | Be a CE Ambassador! | Forgot password? | Sponsor CE | Contact Us
Navigation
Go Back   CrazyEngineers Forum > CE : Technical Discussions > Computer Science & IT Engineering
Reply

  #1 (permalink)
Old 14th December 2007, 01:10 AM
CE - Newbie
 
sai krishna's Avatar
 
I'm a Crazy computer science Engineer
Join Date: 3rd December 2007
Posts: 6
Post Difference between compiler and interpreter

Hi CEans


As the title suggests can any one breifly explain me the diff. b\n compiler and interpreter


thanks inadvance.
__________________
your success or failure in life depends upon the work ur doing right now.
sai krishna is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
  #2 (permalink)
Old 8th January 2008, 07:24 PM
CEan - Value Adder
 
kidakaka's Avatar
 
I'm a Crazy Computer Science Engineer
Join Date: 18th October 2006
Location: Mumbai, Hyderabad
Posts: 465
Send a message via AIM to kidakaka Send a message via MSN to kidakaka Send a message via Yahoo to kidakaka Send a message via Skype™ to kidakaka
Default Re: Difference between compiler and interpreter

Hi Sai,

A compiler first takes in the entire program, checks for errors, compiles it and then executes it. Whereas, an interpreter does this line by line, so it takes one line, checks it for errors and then executes it.

Eg of Compiler - Java
Eg of Interpreter - PHP

Hope this clarifies things.

PS - Oh, and sorry for such a late reply
kidakaka is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)
Old 17th January 2008, 07:58 PM
CE - Apprentice
 
Sunu's Avatar
 
I'm a Crazy Computer Science Engineer
Join Date: 17th January 2008
Posts: 10
Default Re: Difference between compiler and interpreter

Quote:
Originally Posted by sai krishna View Post
Hi CEans


As the title suggests can any one breifly explain me the diff. b\n compiler and interpreter


thanks inadvance.
They are both similar as they achieve similar purposes, but inherently different as to how they achieve that purpose. Compiled code takes programs (source) written in some kind of programming language, and then ultimately translates it into object code or machine language. Compiled code does the work much more efficiently, because it produces a complete machine language program, which can then be executed. The interpreter translates instructions one at a time, and then executes those instructions immediately. The compiler is itself a computer program written usually in some implementation language.
Sunu is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)
Old 4th February 2008, 07:41 AM
CE - Addict
 
friendster7's Avatar
 
I'm a Crazy Computer Science Engineer
Join Date: 4th February 2008
Location: india,karnataka
Posts: 386
Send a message via Yahoo to friendster7
Default Re: Difference between compiler and interpreter

interpretor translate the program line by line and compiler translate the entire program interpretor requires less memory and compiler requires more memory

definition of compiler:


Compiler is a program that translates a computer program written on one computer language to another computer language. A "compiler" is primarily used for programs that translate source code from a high level language to a lower level language (e.g., assembly language or machine language). A program that translates from a low level language to a higher level one is a decompiler. A compiler for a relatively simple language written by one person might be a single, monolithic, piece of software. When the source language is large and complex, and high quality output is required the design may be split into a number of relatively independent phases, or passes. Having separate phases means development can be parceled up into small parts and given to different people. It also becomes much easier to replace a single phase by an improved one, or to insert new phases later.



Interpreter is a program that translates an instruction into a machine language and executes it before proceeding to the next instruction..... A high-level programming language translator that translates and runs the program at the same time. It translates one program statement into machine language, executes it, and then proceeds to the next statement. This differs from regular executable programs that are presented to the computer as binary-coded instructions. Interpreted programs remain in the source language the programmer wrote in, which is human readable text. Interpreted programs run slower than their compiler counterparts. Whereas the compiler translates the entire program before it is run, interpreters translate a line at a time while the program is being run. However, it is very convenient to write an interpreted program, since a single line of code can be tested interactively.
friendster7 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)
Old 31st October 2008, 05:16 PM
CE - Newbie
 
I'm a Crazy software engineer Engineer
Join Date: 31st October 2008
Posts: 1
Default Re: Difference between compiler and interpreter

hello, you have provided useful information
mpreeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored links
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +5.5. The time now is 10:52 PM.
Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Member comments are owned by the poster. Copyright © 2005-2008 CrazyEngineers.com. All rights reserved.Ad Management by RedTyger