compiler compiles the source code into a common intermediate language

Source: Internet
Author: User

Simply put, a compiler is a program that translates "one language (usually a high-level language)" into "another language (usually a low-level language)". A modern compiler's main workflow: source code → preprocessor (preprocessor) → compiler (compiler) → object code → linker (Linker) → executable Program (exe Cutables)

For high-level languages such as C #, VB, the compiler completes the function of compiling the source code (SOURCECODE) into a common intermediate language (Msil/cil) bytecode (bytecode). In the last run, the Machine code (NATIVECODE) can be programmed to be computed directly by the CPU by the conversion of the common language runtime.

1  Packagecom.table;2 ImportJava.util.Scanner;3 4  Public classfivetable {5 6      Public Static voidmain (String [] args)7     {8SYSTEM.OUT.PRINTLN ("Input score:");9Scanner Scanner =NewScanner (system.in);Ten         intScore =scanner.nextint (); One         intCount = 0; A         if(Score < 60) -         { -             inttemp =score; the              while(Temp < 60) -             { -temp++; -count++; +             } -System.out.println ("Before:" +score); +SYSTEM.OUT.PRINTLN ("Result:" +temp); ASystem.out.println ("Add" + Count + "Test"); at         } -         Else -         { -System.out.println ("end!"); -         } -     } in}

compiler compiles the source code into a common intermediate language

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.