Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Difference between Compiled and Interpreted language

Difference between Compiled and Interpreted language

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mur2501
    wrote on last edited by
    #1

    I don't understand clearly what is the difference between compiled and interpreted? As they all are translated to another language when they are build.

    L A W 3 Replies Last reply
    0
    • M Mur2501

      I don't understand clearly what is the difference between compiled and interpreted? As they all are translated to another language when they are build.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See difference between compiled and interpreted - Google Search[^].

      1 Reply Last reply
      0
      • M Mur2501

        I don't understand clearly what is the difference between compiled and interpreted? As they all are translated to another language when they are build.

        A Offline
        A Offline
        Albert Holguin
        wrote on last edited by
        #3

        Mur2501 wrote:

        As they all are translated to another language when they are build.

        That's just it... interpreted languages aren't really translated to another language, they are kept in their original format until run by the user. When the user runs the program, he's really running the interpreter, which takes the script in and interprets what is to be done. The definition is not always as cut and dry as you might think, there are a lot of languages nowadays that produce byte-code or some other in-between by-product that will be further interpreted at run-time.

        1 Reply Last reply
        0
        • M Mur2501

          I don't understand clearly what is the difference between compiled and interpreted? As they all are translated to another language when they are build.

          W Offline
          W Offline
          W Balboos GHB
          wrote on last edited by
          #4

          Another difference to consider is their behavior. For an interpreted language, the program is run line-by-line when you request it to run. If there is a problem in the logic or any other 'bad things', it will run until it hits one. Thus, if you misspelled a variable's name it wouldn't react to it until you run it and it happens to come across the misspelled version. Also, if you left out a BEGIN or END statements, it would run until that caused a problem, if ever. Some feel that these languages are easier for beginners to start with because they're not all-or-nothing, but not everyone agrees with that. Now, for a compiled language, the entire program is converted to 'machine code' (often in several steps). This code has to take the entire program into consideration at once. If you have a problem it will not be able to figure out what to do and you'll get an error. The program will NOT be compiled. A misspelled variable is 'undefined' and would be a problem. Similarly, the compiler will look for an END for every BEGIN, in the correct order or it will be an error. Compiling a program is an all-or-nothing affair. Because of this difference in when the program is turned into real computer instructions, the interpreted languages are much slower than compiled languages when running.

          "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

          "As far as we know, our computer has never had an undetected error." - Weisert

          "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups