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