Thread: what's the difference of them ???

  1. #1
    flashing vampire black's Avatar
    Join Date
    May 2002
    Posts
    563

    what's the difference of them ???

    whe reading my book--Thinking in C++, the great guy Bruce said that some language use intepreter while some others is with compiler. what's the difference and how could I distinguish them please ???
    Never end on learning~

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793
    Basically, with compiled code, the machine language code is put into a file (exe for example) and this is then loaded into memory on execution. The processor then starts reading the code and doing its magic....

    With an interpreted language, the code is translated to another form (could be text instructions or an intermediate language)...then at runtime this is interpreted into the machine code that the CPU runs.....

    Typical compiled stuff - C++, Pascal....

    Typical interpreted stuff - PHP, VBScript....

  3. #3
    flashing vampire black's Avatar
    Join Date
    May 2002
    Posts
    563
    then what about the speed between them please ? Maybe interpreter is faster but larger in size ?
    Never end on learning~

  4. #4
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    interpreted code is much slower.
    hello, internet!

  5. #5
    flashing vampire black's Avatar
    Join Date
    May 2002
    Posts
    563
    Originally posted by moi
    interpreted code is much slower.
    that is: interpreter are commonly slower and it's files are smaller in size, yes ?
    Never end on learning~

  6. #6
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    Code that needs an interpreter is, of course, useless without the interpreter. The "code" may, but is not necessarily, smaller, but to be fair, you should add the size of the interpreter.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

  7. #7
    flashing vampire black's Avatar
    Join Date
    May 2002
    Posts
    563
    Originally posted by adrianxw
    Code that needs an interpreter is, of course, useless without the interpreter. The "code" may, but is not necessarily, smaller, but to be fair, you should add the size of the interpreter.
    thanx

    Compiler makes the .exe file but interpreter makes .*** ones, right ?
    Never end on learning~

  8. #8
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718
    Originally posted by black
    Compiler makes the .exe file but interpreter makes .*** ones, right ?
    Not necessarily. Visual Basic is an interpreted language, and you can compile it to a *.exe file, but it has an internal reference to an interpreter: MSVBVM**.dll. But some interpreted languages, such as ASP(*.asp) or PHP(*.php, *.php3) cannot be compiled.
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Review required for program of date difference
    By chottachatri in forum C Programming
    Replies: 6
    Last Post: 10-31-2008, 11:46 AM
  2. Difference Equations / Recurrence Relations
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 10-05-2007, 10:26 AM
  3. What's the difference between var++ and ++var
    By ulillillia in forum C Programming
    Replies: 6
    Last Post: 05-31-2007, 02:27 AM
  4. how to get difference of digits
    By Leeman_s in forum C++ Programming
    Replies: 5
    Last Post: 12-20-2001, 08:32 PM
  5. What is the Difference between ANSI C and non-ANSI C ?
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 11-24-2001, 06:55 AM