Contacts

Pascal language and integrated program development environments. Program development tools in the Free Pascal language Basic features of the pascal abc programming environment

“Pascal ABC” is a training system that allows schoolchildren and students to become familiar with the programming language of the same name. It was developed in 2002 by Russian scientists. The developers' task was to create a programming environment that would meet modern standards and could easily teach students.

The interpreter is designed for 32-bit systems and contains ways to implement some features. Despite the fact that the original ones were considered unnecessary for training.

The compiler allows you to use simplified types of language constructs, which facilitates the transition from basic programs to modular and object-oriented ones.

The Pascal ABC program has become free software since version 3.0.

Peculiarities

The program has hints that are provided when writing code, auto-formatting, a debugger and a form designer. designed for tasks of easy and medium complexity and for language learning.

The compiler is capable of executing code as fast as C#, and a little slower than C++, Delphi.

Thanks to the .NET platform, software supports all the features of Microsoft.NET and its libraries. You can safely use the latter in your programs, even relying on those created in another programming language.

“Pascal ABC” also has an online version, which has become widespread. It works without failures, the I/O process occurs over the network; programs are saved on the server.

Among many programmers there is an opinion that Pascal is a dead language, and the cessation of its use is a matter of time. This statement is based on the fact that schools use an old programming environment with reduced capabilities. This prevents students from fully appreciating all the functions of language.

Training modules

Thanks to Microsoft.NET, Pascal ABC received a standard library that has many classes that allow you to solve problems of varying complexity. That is why there is simply no need to develop your own modules, but there is certainly an opportunity to do this. As a rule, those that already exist thanks to programmers are aimed at better language acquisition.

In order to teach schoolchildren, the “Robot” and “Draftsman” modules are used. They have more than 200 examples that are subject to auto-checking. By solving these problems, a person will easily master the basic structures of the Pascal language.

The list of modules does not end there. There is a built-in electronic problem book, which is useful for those who study on their own or want to repeat the material and consolidate knowledge.

In order to create graphic elements in the Pascal ABC program, vector and raster graphics.

Differences

The programming environment has a form designer, thanks to which you can create a windowed application. Unlike other compilers, this one does not have a very voluminous and sophisticated interface, and does not create many additional files. By interacting with one small program, Pascal ABC forms only one element on the disk.

The programming environment has a special shell that works for console tasks. Input and output of information is carried out exactly in it, designed in the form of a window. Among the “native” languages ​​used by the program are Russian and English, which makes it easy to use.

Tasks

Tasks are written using the Pascal programming language. It is easy to learn, so your first program may very well be very easy to use. All over the world the following lines are considered as opening lines:

  • Begin.
  • Writeln(‘Hello World!’).

The first and last lines are operator brackets, which should contain the essence of the task. The second one declares the output of text enclosed in quotes. Here are some easy examples. “Pascal ABC” has many similar programs in its problem book, which are easy and interesting to learn.

Programming environment– a set of programs that allows you to perform a set of operations related to the production of programs and work with them and includes:

    interpreter, compiler (translator);

    program – a shell that allows you to control the operation of the environment using a menu;

    an intelligent text editor that allows you to enter and edit program texts;

    A program debugger that provides the user with special debugging tools to speed up program debugging.

The TP programming environment can run under MS – DOS.

9. Composition of the Turbo Pascal programming environment.

The QBASIC programming environment contains the following files:

HERC. BGI drivers various types PC video systems

LITT.CHR _ files containing vector fonts

10. Data and quantities

The set of quantities with which a PC works is usually called data. In relation to the program, the data is divided into:

    original,

    intermediate,

    results.

Rule:INEvery quantity occupies its specific place in the PC memory.

The quantities are divided into permanent And variables.

Constant values ​​(Const) – quantities whose value is indicated in the text of the program and does not change during execution.

Any constant, like a variable, occupies a memory cell, and the value of these quantities is determined binary code in this cell.

Variables- a quantity whose value changes during program execution.

Names are used to identify variables. For each variable in the computer memory, one or more memory cells are allocated. The variable name serves as the address of the cell in which the variable's value is stored. By specifying in the program, we can extract the name from the memory cell and the value of the variable. This means that instead of data, the program uses variable names.

Each quantity has 3 main properties:

Meaning,

11. Data typology. Characteristics of the main data types.

Type- a set of values ​​that an object can take and a set of operations allowed on these values.

The minimum required set of basic data types.

    INTEGER- type whole,

    REAL- type valid,

    CHAR- type symbolic,

    BOOLEN- type logical,

    BYTE- type bitwise (0 - 225)

The types of constants are determined by the context (the form of the entry in the text), and the types of variables are established in the variable descriptions.

Classification of data by structure.

There is another option for data classification - classification by structure. The data is divided into:

- simple (scalar- one value corresponds to one value),

- structured(one value corresponds to many values ​​-

these are arrays, sets, strings, etc.) .

Goals:

  • Educational: forming an idea of ​​the structure of a program in the Pascal programming language, studying the Pascal ABC programming environment.
  • Developmental: improving the ability to analyze, compare, systematize and generalize, developing students’ communication skills.
  • Educational: instilling in students accuracy when compiling algorithms and programs in notebooks.

Tasks:

  • Review the basic concepts of the topic “Algorithmization”.
  • Understand the menu items of the Pascal ABC programming environment.
  • Study the structure of the program.
  • Reinforce the concept of program structure by writing a simple program in the Pascal programming language.

Lesson type: combined

Forms of organization of educational and cognitive activities: frontal, group.

Leading teaching method: explanatory and illustrative.

Basic teaching aids: presentation on the topic of the lesson, interactive board, computer.

Software: Windows operating system, Pascal ABC programming environment, Notebook interactive whiteboard software.

Structural elements of the lesson:

Lesson steps

Teacher's activities

Student activity

Time
(min)

1 Organizational Greeting students, announcing the topic, lesson objectives 2
2 Updating knowledge Conducting a frontal survey Answer questions 8
3 Learning new knowledge Explaining new material using a presentation Assimilation of new knowledge and mastery of working techniques in the Pascal ABC programming environment, make notes in a notebook. 20
4 Primary consolidation of knowledge Explanation of program structure using the example of a program that prints the sum of two numbers. Writing an ABC program in the Pascal programming environment that displays the student’s last name and first name 13
5 Summarizing Grading active learners 2

This lesson is based on the use of an interactive whiteboard. Annex 1 contains a presentation created using SmartBoard Notebook interactive whiteboard software.

I. Organizational moment(Annex 1, slide 1).

Hello, sit down!
Today in the lesson you will get acquainted with the Pascal ABC programming environment. We will also study the structure of the program, and today in the lesson you will independently write your first program on a computer and see the result of its execution.
But before we start new topic, let's review the material from previous lessons that we will need in class.

II. Updating and testing knowledge.

Question

Answer

Slide content

1. Slide 2 Put the development steps in the correct order computer program:
  1. Formulation of the problem.
  2. Development of an algorithm for the problem being solved.
  3. Writing an algorithm in a programming language.
  4. Broadcast of the program.
  5. Debugging the program.
  6. Testing the program.
The student, by moving objects, establishes correspondence.
2. Slide 3 Define an algorithm. “An algorithm is a strictly defined sequence of actions aimed at achieving certain goals in a finite number of steps.” (Privalov Egor Nikolaevich) After answering the question, the student clicks on the question mark. The definition of the algorithm appears on the screen. Object animation is used.

3. Slide 4 Establish a correspondence between the graphic blocks of the algorithm and their names. Oval – beginning, end of the algorithm;
rectangle – an arithmetic operation or sequence of actions;
diamond – choice of action depending on the truth or falsity of the condition;
parallelogram – input/output of variable and text values;
arrows – direction of execution of algorithm steps
Using the Pen tool

4. Slide 5 Formulate a definition of program translation. Translation is the process of creating an executable program from a source one, i.e. programming language statements are converted into machine codes..

5. Object animation is used Slide 6 Place the blocks in the correct order. Two types of translators: interpreter and compiler. The interpreter sequentially analyzes and executes each line of the program. The compiler conducts a complete analysis of the written program and generates machine code that is completely ready for execution.

6. The student moves objects. Slide 7
Correct answer:

7. Debugging is the process of correcting errors in a program. Slide 8 Slide 7
Drag all incorrect options to the Trash.
Program testing is the process of studying the operation of a program on as many sets of source data as possible.

8. The student moves objects Slide 9 Match the names of data types.
Integer – type of integers;
Boolean – logical type;
Char – character type;
Real – real type;
Using the Pen tool

9. String – string type Slide 10
Specify the quantity type if the value of the quantity is:
151
0.15
'computer'
‘computer’ – string
151– integer
Program testing is the process of studying the operation of a program on as many sets of source data as possible.

0.15– real.

  • Well done! The most active were: ______________, and in order to give you a rating, I suggest you answer additional questions: Who is the author of the Pascal programming language? (
  • Niklaus Wirth) 1970)
  • In what year did Wirth develop Pascal? ( Give examples of other programming languages? (

Basic, Java, C, Delphi)

III. Explanation of new material Now let's move on to the topic of our lesson. We launch the Pascal ABC programming system. The Pascal ABC working window contains elements already familiar to us: this Window title bar , buttons: Collapse, Full screen, Close . Below is Menu bar , then.
Toolbar Below the toolbar is Tab , i.e. the program that is now open and Working window of the program , i.e. the window in which we will directly type the text of the program. On both sides of the window there are Scroll bars , which are used if the program text does not interfere with the working window. At the bottom of the screen is Status bar change cursor position).
In order to better navigate the Pascal ABC programming environment, let's look at main menu items.
First menu item File. Like other Windows applications we see a menu item New(we create new program), Open(open a previously saved program), Save(we can save the program with the extension pas), Save all(used if you need to save several open source software), Printing, Page Setup, Exit(exit the program).
Next menu item Edit. Here are commands for working with program text. You can undo an action, restore an action, cut, copy, paste, find, replace, find next (must be shown to students: select part of the program, copy, paste).
Next menu item View. At this point, you can enable/disable program execution windows, debugging windows, etc. To do this, click on the corresponding command and see that the program execution window appears. These concepts are new to you, and as you continue to study Pascal you will become familiar with them in more detail.
In menu item Program you can start executing the program. Pay attention to the hotkey combinations. Write down in your notebooks: program execution: Program – Execute, or F9 or click on the Toolbar . Completing program execution: Program – Finish, or Ctrl+F2 or click on the Toolbar . (Annex 1, slide 11).
Execute the program step by step. If an error is made in the program or you need to check part of the program, you carry it out step by step, i.e. press F7, and each press of this key corresponds to the execution of one specific command. Next point Add expression: click, enter the expression and it appears in the debugging window.
Next point Service. The Pascal ABC program has built-in tasks; to view their contents, select the item View assignment. We select a topic, a task, click view and, based on the conditions, we can create a program, and the Pascal ABC program will check the correctness of the task.
In menu item Help There is a built-in electronic textbook.
The Toolbar contains the buttons that are most frequently used.
Let's get acquainted with the structure of a program in the Pascal programming language.
We present to your attention a short video: Program structure. Your task is to listen carefully and try to remember the main blocks of the program. COR “Program Structure” (Federal Center for Information and Educational Resources (FCIOR) of the Ministry of Education and Science of Russia (http://fcior.edu.ru/). Duration: 1 min.
So, here is the program structure (Annex 1, slide 12):

Blocks highlighted in green are optional and are included in the program as needed. (the animation of green blocks is configured on the slide; after the section name is announced, the block disappears from the screen).
Let's consider the structure of the program using the example of an algorithm for solving quadratic inequalities (Annex 1, slide 13):

Let's write a simple program that displays the sum of two integers. Open the Pascal ABC programming environment.

ProgramExample_1; (program title: the service word Program and the name, which should not contain spaces, it should consist only of Latin letters, numbers and some special characters)

Varx, y, z: integer; (variable description section; all variables that will be used in the program are listed, and the type of these variables is also indicated. In this case, we find the sum of two integers (x, y). Since we are given integers, the result of the sum will be also an integer)

Begin(beginning of the operators section).

Writeln ('Enter two integers'); (output operator, displays text enclosed between apostrophes)
Readln (x, y); (input operator, reads data entered from the keyboard. In our program it is necessary to enter two integers, after entering them, a variable x is assigned a value equal to the first number entered, and the variable y is assigned a value equal to the second number entered).
z:=x+y; (the assignment operator works like this: first the sum of the variables is calculated x And y, and then the resulting value is assigned to a variablez}
Writeln (‘the sum of the numbers is equal to’, z); (the output operator displays the text enclosed between apostrophes and the value of the variable z).

End . (end of operators section).

IV. Reinforcing the material learned

Exercise. Write a program that displays a greeting and your last name and first name.

V. Summing up

- Well done! Today in class you wrote your first program on a computer. Homework: Write a program that displays the product of two numbers.

Ministry of Education and Science of the Russian Federation

State educational institution

higher professional education

"Omsk State Technical University"

Yu. P. Chernov, O. P. Shafeeva

Programming in Pascal abc system

Tutorial

Publishing house Omsk State Technical University

UDC 004.4 (075)

BBK 32.973-018ya73

Reviewers:

V. I. Starikov, Ph.D. tech. Sciences, Associate Professor OGIS;

S. S. Efimov, Ph.D. tech. Sciences, Associate Professor Omsk State University named after. F.M. Dostoevsky

Chernov, Yu. P.

Ch 49 Programming in the systemPascal ABC: textbook allowance / Yu. P. Chernov, O. P. Shafeeva. – Omsk: Omsk State Technical University Publishing House, 2010. – 100 p.

ISBN 978-5-8149-0897-1

The manual includes theoretical material with a description of the elements of the Pascal ABC language and programming system, as well as examples of the development of algorithms and programs in the Pascal language for problems of different levels of complexity. The considered schemes of the designed algorithms make it easier for students to master the material.

The textbook is intended for studying the high-level programming language Pascal in the disciplines “Computer Science”, “Fundamentals of Algorithmization and Programming”, “Algorithmic Languages ​​and Programming”, “Programming in a High-Level Language”.

Published by decision of the editorial and publishing council of Omsk State Technical University

UDC 004.4 (075)

BBK 32.973-018ya73

ISBN978-5-8149-0897-1 © GOU VPO "Omsk State

Technical University", 2010

Introduction

The most common programming language currently used for IBM PC series computers is Pascal. This is a high-level language, characterized by simple syntax, structured and convenient for initial learning of programming.

Educational programming system Pascal ABC(author  S.S. Mikhalkovich) is a dialect of the standard Pascal language.

The Pascal ABC system is intended for teaching programming in the Pascal language and is aimed at junior students. According to the developers of this system, initial programming training should take place in fairly simple and friendly environments, at the same time, these environments should be close to standard and have rich and modern libraries of subroutines.

The advantages of the Pascal ABC system include the fact that it allows:

    program in a Pascal language similar to Delphi Pascal, including object-oriented extensions;

    work with graphics;

    create event applications.

The Pascal ABC system is based on Delphi language Pascal is designed to make a gradual transition from the simplest programs to modular, object-oriented, event-based and component programming. Some language constructions allow, along with the main one, simplified use, which allows them to be used in the early stages of learning.

The most important advantages of the Pascal ABC package include compliance with standard Pascal, fast program compilation, combination of a compiler with a text editor, error warning at the source program level, an extensive library of routines and useful extensions that simplify programming. It is advisable for a novice programmer to start learning the language and environment with this package.

The Pascal ABC compiler is a front-end compiler. This means that it does not generate executable code as an .exe file, but rather creates a program tree in memory as a result of compilation, which is then executed using the built-in interpreter. As a result, the speed of the program turns out to be slower speed work of the same program compiled in the Borland Pascal environment or in the Borland Delphi environment. However, on modern computers this is practically not felt.

The name "Pascal ABC" refers to an interactive programming system consisting of a language compiler and an associated screen editor. The interactivity of the system is manifested mainly in the ease of editing and processing errors found in the source code of programs. Programs are launched in this system at the source level. High compilation speed means that the transition from source code to executable program occurs very quickly. This significantly shortens the cycle of program transformation from editing to compilation and execution of programs.

The Pascal ABC system includes both a programming language and a tool environment designed for writing, debugging and executing programs. The language is characterized by advanced capabilities compared to the Pascal language standard and a well-developed library of modules that allow you to use the capabilities of the operating system, generate graphic images, etc. The instrumental programming environment allows you to create program texts, compile them, find errors and quickly correct them, test and execute a debugged program. The environment also includes a large amount of reference information.

This tutorial describes the syntactic rules and basic capabilities of the language, working in an integrated environment. Practical programming techniques are demonstrated using examples of solving specific problems.

The manual was prepared taking into account the experience of giving lectures and conducting laboratory classes by the authors at the computer training center of Omsk State Technical University. First of all, the manual is intended for university students and provides theoretical guidance on programming both in the Pascal ABC environment and in the Free Pascal and Turbo Pascal environments.

Did you like the article? Share it