What are compilation languages, explanatory languages, and scripting languages?

Source: Internet
Author: User

From: http://www.diybl.com/course/3_program/java/javajs/20081124/152528.html

What are compilation languages, explanatory languages, and scripting languages?
Computers cannot directly understand high-level languages, but can only directly understand machine languages. Therefore, they must translate high-level languages into machine languages so that computers can write programs in High-level languages.

There are two translation methods: Compilation and interpretation. The two methods only have different translation time. Before executing a program written in a compiled language, a special compilation process is required to compile the program into a machine language file, such as an EXE file. If you want to run the program later, you do not need to re-translate it, you can directly use the compiled result (exe file). Because only one translation is performed and no translation is required during running, the execution efficiency of the compiled language program is high.

Different interpretations: The program of an explanatory language does not need to be compiled. It saves a lot of time for the process and can be translated only when the program is running, for example, an explanatory BASIC language, there is a special interpreter that can directly execute the BASIC program. Each statement is translated only when it is executed. In this way, each execution of an explanatory language requires a translation, which is less efficient.

What is a scripting language?

1. The scripting language (JavaScript, VBScript, etc.) is between HTML, C, C ++, Java, C #, and other programming languages.
HTML is usually used to format and link text. Programming languages are usually used to send a series of complex commands to machines.
2. There are many similarities between the scripting language and the programming language. Their functions are similar to the programming language, and they also involve variables. The biggest difference with programming languages is that the syntax and rules of programming languages are stricter and more complex.
3. Relationship with program code: script is also a language, which is also composed of program code.
Note: The script language generally has a corresponding Script Engine for interpretation and execution. They generally need interpreters to run. Javascript, ASP, PHP, and Perl are all scripting languages. After C/C ++ is compiled and linked, an independent EXE file can be generated.

4. a scripting language is an explanatory language, such as VBScript, JavaScript, and InstallShield script. Unlike C/C ++, it can be compiled into binary code and can exist in the form of executable files.

The script language does not need to be compiled. It can be directly used and interpreted by the interpreter.
5. script languages generally exist in the form of text, similar to a command.
For example, if you have set up a program named aaa.exe, you can open a file with the. AA extension.
You are. the compilation of AA files specifies a set of rules (syntax) when others write. AA file, your program uses this rule to understand the intention of the author and respond. therefore, this set of rules is the scripting language.

Java language

 

Java is very special. Java programs also need to be compiled, but not directly compiled as the machine language. Instead, compilation is called bytecode and then executed in an interpreted way. Java can be compiled or interpreted. Through the compiler, you can translate a Java program into an intermediate code called bytecode-a platform-independent code that can be interpreted by the Java interpreter. Through the interpreter, each Java byte command is analyzed and then run on the computer. You only need to compile the program once and explain it during the running of the program. Demonstrate how it works

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.