Procedural programming - what is it?

Table of contents:

Procedural programming - what is it?
Procedural programming - what is it?
Anonim

Procedural programming is programming that reflects the background of the Neumann architecture of the computer. All programs written in this language are a certain sequence of commands that establish a certain algorithm for solving a particular set of problems. The most important command is the assignment operation, which is designed to establish and correct the contents in the computer's memory.

What is the main idea of this language?

The main feature of procedural programming languages is the use of computer memory to store information. The functioning of the program is reduced to the constant and alternate execution of different commands in order to transform the contents of memory, change its initial state and bring about the desired results.

How it all began

Fortran language
Fortran language

Procedural programming began with the creation of a high-level language called Fortran. It was created in the early fifties in the USA by IBM. The first publications about him appeared only in 1954. The procedurally oriented programming language Fortran was developed to perform scientific and technical tasks. The main objects of the language are numeric variables, real and integer numbers. All expressions are built on four main arithmetic calculations: exponentiation, ratio operations, parentheses, logical manipulations AND, NOT, OR.

The main operators of the language are output, input, transition (conditional, unconditional), calling subroutines, loops, assignment. Procedural programming in the Fortran language has been the most popular in the world for a very long time. During the existence of the language, a huge database of various libraries and programs was accumulated that were written specifically in Fortran. Now work is still underway on the introduction of the next Fortran standard. In 2000, a version of Fortran F2k was developed, whose standard version is called HPF. It was created for parallel supercomputers. By the way, PL-1 and BASIC languages use many standards from Fortran.

Cobol language

Cobol language
Cobol language

Cobol is a procedural programming language. This is a programming language aimed at solving many problems of information processing. It is actively used to solve various managerial, accounting and economic problems. Procedural programming in Cobol was developed in the United States in 1958-1960. The program itself, created in Cobol, has several types of sentence types in English, resembling the most ordinary text in appearance. The point is that the groupoperators written sequentially are combined into whole sentences, the sentences themselves are combined into paragraphs, and paragraphs are combined into sections. The programmer himself assigns names or labels to paragraphs and designated sections to make it easier to refer to a specific section of code. In the Soviet Union, a Russian version of the program was developed and applied very successfully in practice.

Procedural-oriented programming in the Cobol language is realized thanks to powerful working tools that are able to process huge data streams that are stored on various external drives. There are many applications written in this language that are actively used even now.

Interesting fact: the highest paid programmers in the US write programs in Cobol.

Algol language

Algol language
Algol language

This procedural programming language was created by a whole group of specialists in 1960. This was the result of the beginning of cooperation at the international level. Algol was developed for the maintenance of algorithms that were built in the form of a sequence of certain procedures that were used to solve the tasks. At first, the language was perceived somewhat ambiguously, but it was recognized at the international level, it played a huge role in the development of the basic concepts of programming and teaching a new generation of programmers. Procedural programming in the Algol language was the first to introduce such concepts as "program block structure", "dynamic memory allocation".

There is one more feature of the language -this is the ability to enter some local marks in the block that do not apply to the rest of the program code. Yes, Algol-60, despite its international origin, was not as popular as Fortran.

Not all foreign computers had translators from Algol-60, so this procedural programming has undergone changes and an improved Algol-68 language has appeared.

Algol-68

It was already a versatile and multipurpose advanced programming language. Its main feature was that with the same program it was possible to translate from various versions of the language without any cost in adapting this language to different categories of programmers who might have domain-specific dialects of the language.

If we judge the capabilities of this language, Algol-68 is even now ahead of many programming languages in terms of its capabilities, however, due to the fact that there are no effective computers for this procedural programming language, it has not yet been possible to create a high-quality and fast compiler.

How did the famous BASIC appear?

Basic language
Basic language

Procedural programming languages also include the world-famous BASIC. In the mid-sixties, employees at Dartmouth College named Thomas Kurtz and John Kemeny developed a unique programming language that turned everything upside down in the world. It consisted of the simplest English words and the new language was recognized as a universal code for beginners, or in other words BASIC. Year of birthThis language is believed to be 1964. BASIC has become widespread on the PC in an interactive dialogue mode. Why has BASIC become so popular? All due to the fact that it was as easy as possible to master, in addition, the language helped to solve many different scientific, economic, technical, gaming and even everyday tasks. BASIC had different default rules, which is now considered a sign of bad taste in programming. After that, a lot of versions of this language appeared in the world, which are often incompatible, however, understanding one of the versions, you can easily master the other. The original version only had an interpreter, but now there is also a compiler.

In the early sixties, all the then existing languages were focused on solving various problems, but they were also tied to a specific computer architecture. This was considered a disadvantage, so it was decided to develop a universal programming language.

PL/1

This is the very first multi-purpose universal language that was created in the USA by IBM. Years of creation 1963-1966. It is believed that this is one of the most common languages, it is adapted to solve many problems in the field of computer technology: planning, the study of various computing processes, modeling and solving logical problems, the study of logic circuits, the development of systems for mathematical software.

When PL/1 was created, various concepts and tools from Algol-60, Fortran, Cobol were used in practice. PL/1 is considered the most flexible and richest language, it allowscreate inserts, correct the finished program text even during debugging. The language is widespread, and translators from it are used in many types of computers. IBM even now continues to support this language.

Pascal

Language Pascal
Language Pascal

Pascal is a very popular procedural language, especially used for personal computers. This procedural programming language was created as an educational language, the years of its creation are 1968-1971. Developed by Niklaus Wirth at the ETH in Zurich. This programming language was named after the great French mathematician and philosopher Blaise Pascal. Wirth's main task was to create a language that would be based on the simplest syntax, a small number of basic structures that are transformed into machine code using a conventional compiler. It is worth noting that he succeeded.

The procedural paradigm of Pascal programming is based on the following principles:

  • Structured programming. In this case, subroutines are used, independent data structures. The programmer manages to create easily readable code, understandable program structure, simplifies testing and debugging.
  • Programming built from top to bottom. The task is divided into simple tasks to be solved, and on the basis of the constructed subtasks, the final solution of the general task is already being built.

C language

C language
C language

Procedural Programming C developed by Bell Labs to implement the UNIX operating system, not originally considered asmass. The developers had plans to simply replace Assembler, but just a separate C language appeared. It is unique in that it has the capabilities of high-level programming languages and at the same time it has the means to access functional relationships. The C language does not have the concept of a procedure, the syntax is quite simple, there is no strict data typing, the ability to express a couple of actions at once is included. This language immediately attracted the attention of programmers, giving them additional opportunities for creating interesting programs. To date, the C language is quite popular, it is widely used by professionals in programming. Now it is implemented in many computer platforms.

What is special about procedural languages?

There are only a few of them, so each one is worth talking about. This is:

  • Module. A piece of the program that is saved in a separate file. The module implements a set of options that are associated with certain variables, constants or objects.
  • Function. This is a complete, independent piece of code that solves a specific problem.
  • Data type. This concept speaks of a certain array of information that is defined to one type.

Differences between procedural and object-oriented programming

Object Oriented Programming
Object Oriented Programming

Many programmers know that procedural and object-oriented programming languages are used in practice when creating software or web applications. What is the difference? Everything is simple, procedural and object-oriented programming is used everywhere in practice, but there are some distinctive points. During the work, the programmer, setting himself a specific task, breaks it down into small ones, selects certain language constructs for implementation (loops, functions, branches, structural operators). This means that the specialist is guided by procedural programming.

OOP includes the concept of "object", otherwise they are also called class instances, since a lot is inherited from the class. Inheritance is another of the distinguishing principles of OOP.

Procedural and functional languages

Procedural and functional programming are the same or not? Functional programming is focused on solving problems in discrete mathematics, while procedural programming is a slightly broader concept and includes a lot of programming languages for solving certain types of problems.

What to choose for yourself?

Many procedural programming languages are outdated. Yes, some of them are still being improved, but still it is worth paying attention to only a part of them. For example, the C language. It is common today in the world, many modern platforms are built specifically in the C language, so if you want to develop in the field of programming, then you should get to know the C language better. However, you can choose something for yourself other, not necessarily related to procedural programming languages.

Recommended: