What is Pascal. Pascal Programming

What is Pascal? Quite a lot of people are asking this question. These are mainly people who use a computer at a basic level. Pascal is one of the most famous programming languages. They study it, as a rule, in high school or in the first courses of universities. It is considered the basis for many other programming languages.

what is pascal

History

What is Pascal, we found out. We now turn directly to the history of its appearance and development. The creator of the language is Nicklaus Wirth. It was developed between 1968 and 1969. The idea of โ€‹โ€‹creating Pascal came to him after participating in a special committee for the development of languages. What is Pascal is interesting to many novice programmers. This name was given to the language in honor of the famous French scientist Blaise Pascal, who is especially famous for the creation of a mechanical machine that summed up two numbers.

pascal programming

The first publications about what Pascal appeared in 1970. They talked about the main goals of creating this language, such as efficiency, which would contribute to excellent programming and data structuring skills.

Language implementation

acquaintance with the Pascal language

  • UCSD Pascal. This system was created in 1978. A compiler port appeared in it, which allowed you to make the code portable, it was also now possible to edit the source system, and so on. In the future, UCSD became the basis for many subsequent implementations of Pascal.
  • Object Pascal. Programming in Pascal has always attracted many novice professionals. In 1986, Apple created an object extension for the language. The development team consulted with Pascal's โ€œfatherโ€.
  • Turbo Pascal. The first version of the integrated development environment appeared in 1983. Borland became a company that began to develop this implementation. However, it is worth noting that Turbo Pascal borrowed a lot from Odject Pascal, and in general these implementations were similar. Pascal programming also interested Microsoft. Almost at the same time, they released their own version of the object language based on Pascal. She could not get mass distribution, and was soon forgotten. Subsequently, the implementation from Borland was called Object Pascal.
  • Object Pascal today. The most important step in the history of Pascal is the release of free implementations. They included all the best from many other dialects. They have excellent compatibility with most operating systems.

Features

Familiarity with the Pascal language must begin with its features. The main one is the strictest typing and the presence of structural programming. Pascal is the first of these languages. According to the developer, the language should contribute to disciplined programming, as it eliminates various syntax errors as much as possible, and also has an intuitive interface. What is Pascal and what are its main features - the main questions that interest beginner programmers. The language is pretty simple even for a beginner.

what is pascal

However, initially the language had a number of drawbacks. The main ones: the inability to work with dynamic memory, a short I / O library, lack of tools to run functions created in other languages, and so on. What is Pascal, whose language is quite simple, in the early 80s, many experts learned. However, not everyone liked it. Some experts even wrote articles that described in detail each lack of language.

Deficiencies and their correction

Like many other programming languages, Pascal boasts not only advantages, but also serious shortcomings. It should be said that gradually the developers are struggling with the minuses, but they do not always succeed in this.

what is pascal language

No matter how it sounds, it is not uncommon for language flaws to help programmers learn. In addition, Pascal in the 80s was a huge step forward in comparison with Fortran, which at that time was studied by beginners. Moreover, Fortran had even more problems. In a very short period of time, Pascal managed to become the main language of instruction in many schools and universities. On its basis, numerous programs began to be developed.

Structure

You can write a lot about Pascal, but you should go directly to the programming process. Each application in Pascal begins with a keyword (Program). Immediately after it, the name of the program is indicated, and then ";" is put. Sometimes this is not required. After the name, you can specify a list of external files that will act as parameters. After that comes the most important thing in the program - her body. It consists of sections describing constants, types, variables, procedures and functions. After them comes the block of operators - the entry point. The statement block is located between the begin and end keywords. Each statement is separated by a semicolon. To end the program, a point is used that is placed after the body.

Application Modules

To use the module in the program code there must be an announcement about it. You can make such an announcement using the connection instruction, which is the USES keyword. After it, the names of the modules that need to be connected are indicated. The instruction fits right after the header or in the interface section.

about Pascal

Some language implementations do not support modules, especially older versions. They can be divided into two types: software and auxiliary. The first is present in the program, starting with the keyword program. The second contains variables, constants, types and so on, can be used in other modules.

Punctuation

Pascal's syntax requires strict execution.

  • Semicolon. It is placed at the end of the heading, after the description of the variables. Using it, operators are separated. You can not use it before the end keyword.
  • Comma. Used as a delimiter in a variety of lists.
  • Point. It is placed at the end of the program body (after the word end).

Such hard syntax is necessary, since the computer is considered the executor of the application. If the wrong character is used, an error is displayed. If the semicolon is a separator of operators, then the operator is all the text located between one semicolon and the next. In case of non-suspension of this sign between operators, the program will perceive them as one, and also give an error.

Pascal language allows you to insert comments. They serve as an explanation of the program code. You can use the Russian language. Comments do not have any effect on the program.

In Pascal, you can write both lowercase and uppercase letters. The choice is up to the programmer.

Criticism

As already mentioned, Pascal was particularly popular in 1980-1990, but there were critics who considered the language frivolous. In their opinion, it is only suitable for training. Particularly notable criticism was set forth in the article "Why Pascal is not my favorite programming language." It was written by Brian Kernighan, one of the developers of the C language. It was after the article that Pascal began to seriously change for the better.

Despite all the shortcomings, Pascal is most pressured by the frivolous attitude of many programmers.

Source: https://habr.com/ru/post/K16237/


All Articles