Small Basic - A compiler or interpreter? RRS feed

  • Question

  • Hi there,

    From my understanding, a compiler translates a high-level programming language into machine language and an interpreter translates a high-level programming language into an intermediate form.

    However, I am a bit confused when it comes to an interpreter. How does it work exactly? Does an interpreter produce an executable file or a bunch of files containing a line of code? I ask this because I watched a youtube video where someone explained that python is an interpreter and outputs thousands of files instead on just one executable file.

    I am thinking that small basic is an interpreter because it produces output very fast and if there is some sort of error, it displays it at the bottom stating the error. However, once the program is run successfully, it produces an executable file. Thus, I am confused with the two terms despite researching about it.

    Can someone please help me out on this?

    Friday, July 5, 2013 5:28 PM


  • SmallBasic compiles code to MSIL (Microsoft Intermediate Langauge) now called CIL, see here.  This is the exe created by SB (a .Net CIL).  This is then turned into native computer instructions as required at run time using the .Net framework, .Net JIT (Just in Time) compiling.

    With the advent of runtimes (.Net or Java) the old notions of interpreters are a bit blurred, it used to mean code translated into instructions line by line as it runs, but with intermediate runtimes it is a bit different.

    Really some googling to get a better idea.

    • Marked as answer by Kyle Julez Friday, July 5, 2013 6:05 PM
    Friday, July 5, 2013 5:43 PM