📜  程序性语言和非程序性语言之间的区别

📅  最后修改于: 2021-09-12 10:33:15             🧑  作者: Mango

程序语言:
在过程语言中,程序代码被编写为指令序列。用户必须指定“做什么”和“如何做”(分步程序)。这些指令按顺序执行。这些说明是为解决特定问题而编写的。

Examples of Procedural languages:
FORTRAN, COBOL, ALGOL, BASIC, C and Pascal.

非程序语言:
在非过程语言中,用户只需要指定“做什么”而不是“怎么做”。它也被称为应用语言或功能语言。它涉及从其他功能开发功能以构建更复杂的功能。

Examples of Non-Procedural languages:
SQL, PROLOG, LISP.

程序语言和非程序语言的区别:

Procedural Language Non-Procedural Language
It is command-driven language. It is a function-driven language
It works through the state of machine. It works through the mathematical functions.
Its semantics are quite tough. Its semantics are very simple.
It returns only restricted data types and allowed values. It can return any datatype or value
Overall efficiency is very high. Overall efficiency is low as compared to Procedural Language.
Size of the program written in Procedural language is large. Size of the Non-Procedural language programs are small.
It is not suitable for time critical applications. It is suitable for time critical applications.
Iterative loops and Recursive calls both are used in the Procedural languages. Recursive calls are used in Non-Procedural languages.