ComputersProgramming

What is Pascal. Programming in Pascal

What is Pascal? Quite a lot of people ask this question. Basically, these are 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 the senior classes or at the first courses of high schools. It is considered a base for many other programming languages.

History

What is Pascal, we found out. Let us now go 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 for many novice programmers. This name was given 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.

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

Implementation of the language

  • UCSD Pascal. This system was established in 1978. In it appeared the compiler port, which allowed to make the code portable, and now it was 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 beginners. In 1986, Apple created an object extension for the language. The development team consulted the "father" of Pascal.
  • Turbo Pascal. The first version of the IDE appeared in 1983. Borland became a firm that started developing this implementation. However, it should be noted that Turbo Pascal borrowed a lot from Odject Pascal, and in general these implementations were similar. Programming on Pascal interested and Microsoft. Almost at the same time, they released their own version of the object language based on Pascal. It could not get mass distribution, and was soon forgotten. Subsequently, the implementation of Borland was called Object Pascal.
  • Object Pascal today. The most important step in the history of Pascal is the release of free realizations. They included all the best from many other dialects. They have excellent compatibility with most operating systems.

Features

Acquaintance with the Pascal language must begin with its characteristics. The main one is the strictest typification and the presence of structured programming. Pascal - the first of this kind of language. As the developer believed, the language should contribute to disciplined programming, since it excludes various syntactic errors as much as possible, and also has an intuitive interface. What is Pascal and what are its main features - the main issues that beginners are interested in. The language is quite simple even for a beginner.

However, initially the language had a number of shortcomings. The main ones are: inability to work with dynamic memory, a short input / output 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 80's learned many experts. Nevertheless, not everyone liked it. Some specialists even wrote articles in which they described in detail about each lack of language.

Disadvantages 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 get it.

No matter how it may sound, but not infrequently the shortcomings of the language helped the programmers to learn. In addition, Pascal in the 80 years was a huge step forward in comparison with Fortran, which at that time studied newcomers. Moreover, Fortran had even more problems. In a very short period of time, Pascal was able to become the main language for instruction in many schools and universities. On its basis, numerous programs have been developed.

Structure

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

Application modules

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

Some language implementations do not support modules, especially older versions. You can divide them into two types: program and auxiliary. The first is present in the program, it starts 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 implementation.

  • Semicolon. Put at the end of the title, after describing the variables. With it, operators are separated. You can not use it before the end keyword.
  • Comma. Used as a separator in a variety of lists.
  • Dot. Put at the end of the body of the program (after the word end).

Such a hard syntax is necessary, since the computer is considered the executor of the application. If an incorrect character is used, an error is displayed. If the semicolon is the operator delimiter, then the operator is the entire text, located between one comma and the next. In case of non-installation of this sign between the operators, the program will take them for one, and also give an error.

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

In Pascal, you can write in both lowercase and uppercase letters. The choice is left for the programmer.

Criticism

As already mentioned, Pascal's special popularity fell on 1980-1990, but there were critics who considered the language to be frivolous. In their opinion, it is suitable only for training. Particularly noticeable criticism was outlined in the article "Why Pascal is not my favorite programming language". Written by Brian Kernighan - one of the developers of the language C. It was after the article that Pascal began to seriously change for the better.

Despite all the shortcomings, most of all Pascal presses the frivolous attitude of many programmers.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.unansea.com. Theme powered by WordPress.