3GL
来自ITwiki,开放的信息技术大百科
在计算机行业中,通常有几代语言来表示语言的发展。 1GL或第一代语言是机器语言或者机器能够直接执行的语言,也就是0和1组成的串。 2GL或第二代语言是汇编语言。典型的2GL指令如下所示: ADD 12,8汇编程序将会把汇编语言转换成机器语言。 3GL或第三代语言是一种“高级”编程语言,例如PL/I,C,JAVA都属于这一类。以下是JAVA语言的一个例子:public
boolean handleEvent (Event evt) { switch
(evt.id) { case Event.ACTION_EVENT: { if ("Try me" .equald(evt.arg)) {编译器会把一个具体的高级编程语言的语句转换为机器语言。(在上述JAVA的例子中,其输出称为字节码,这些字节码再被作为操作系统平台一部分的JAVA虚拟机转换为相应的机器语言。)要运用3GL需要一定的编程知识。 4GL或第四代语言是比3GL更为接近于自然语言的语言。访问数据库的语言通常称为4GL。以下是4GL语句的一个例子:EXTRACT ALL CUSTOMERS WHERE "PREVIOUS PURCHASES" TOTAL
MORE THAN
$1000
5GL或第五代语言是利用可视化或图形化接口编程,从而生成一种原语言,这种原语言通常用3GL或4GL语言编译器来进行编译。例如微软、波兰、IBM,以及其他一些公司就生产了一些5GL可视化编程工具,这些工具可以用JAVA语言来开发一些应用程序。可视化编程可以使你很容易地想象出面向对象编程的类层面,并且可以用一些拖拉式图标来装配程序组件。 In the computer industry, these abbreviations are widely used to represent major steps or "generations" in the evolution of programming language. 1GL or first-generation language was (and still is) machine language or the level of instructions and data that the processor is actually given to work on (which in conventional computers is a string of 0s and 1s).
2GL or second-generation language is assembler (sometimes called "assembly") language. A typical 2GL instruction looks like this:
ADD 12,8
An assembler converts the assembler language statements into machine language.
3GL or third-generation language is a "high-level" programming language, such as PL/I, C, or Java. Java language statements look like this:
public boolean handleEvent (Event evt) { switch (evt.id) { case Event.ACTION_EVENT: { if ("Try me" .equald(evt.arg)) {
A compiler converts the statements of a specific high-level programming language into machine language. (In the case of Java, the output is called bytecode, which is converted into appropriate machine language by a Java virtual machine that runs as part of an operating system platform.) A 3GL language requires a considerable amount of programming knowledge.
4GL or fourth-generation language is designed to be closer to natural language than a 3GL language. Languages for accessing databases are often described as 4GLs. A 4GL language statement might look like this:
EXTRACT ALL CUSTOMERS WHERE "PREVIOUS PURCHASES" TOTAL MORE THAN $1000
5GL or fifth-generation language is programming that uses a visual or graphical development interface to create source language that is usually compiled with a 3GL or 4GL language compiler. Microsoft, Borland, IBM, and other companies make 5GL visual programming products for developing applications in Java, for example. Visual programming allows you to easily envision object-oriented programming class hierarchies and drag icons to assemble program components.




