Niklaus Wirth In the early 70s of the 20th century, the Swiss scientist Niklaus Wirth developed a programming language and gave it the name Pascal, in honor of the famous French mathematician of the 17th century, the inventor of the first calculating machine, Blaise Pascal. Using Pascal, you can develop programs for a wide variety of purposes. The syntax of this language is intuitive even for those who are just starting to learn the basics of programming.




The alphabet of the language is the uppercase and lowercase letters of the Latin alphabet from A to z, as well as the underscore character (_), which is also considered a letter. Uppercase and lowercase letters are interchangeable (equal meaning); Arabic numerals; special single characters: + – * / =., : ; ^ $ special paired characters: () ( ) ; compound signs: =.. (* *) (..).








Program structure Program NameProgram; (program title) Uses ...; (module connection section) Label ...; (label description section) Const ...; (constant description section) Ture...; (type definition section) Var ...; (variable description section) Function...; Procedure...; (section of descriptions of functions and procedures) BEGIN... (section of statements) END.











Arithmetic operations If you write in the program: Writeln(3+8); Then after executing the program, the message 3+8 will appear in the execution screen. If you write: Writeln(3+8); //without apostrophes Then after executing the program, the inscription 11 will appear in the execution screen, i.e. Pascal will do the calculation itself. Try to calculate the expression: 185(14+16)

Slide 1

Slide 2

Lesson 1. My first program Our first program will be a greeting program. It will simply display the text on the computer screen and complete its work. We will also look at the basic rules for designing a program. program First; begin write("Hello,"); writeln("friends!"); writeln("This is the second line") end. The first line is the program title. Program is a service word; First is the name of our program, you can come up with it yourself. At the end of the line there is ";" When listing Pascal instructions, you need to put “;” between them. . Next comes the body of the program. It always begins with the word begin. There is no ";" at the end of the line. The following command or statement displays the word HELLO on the screen; The output text is always enclosed in apostrophes. (" "). This operator displays the word FRIENDS on the screen! and moves the cursor to the next line. Because The "ln" characters in the writeln statement mean "line" - a line. Here at the end of the line ";" is not required, because This is the last operator (you don’t have to put “;” before end). End – ends the body of the program and there must be a period at the end. As a result of executing the program we get

Slide 3

How to install a program on a computer? First, let's look at the stages that the user (programmer) must go through in order to see the correct results of the program on the screen.

Slide 4

Scheme of the stages of creating a program on a computer. start Edit Error? Compile Error? Build Error? Run Error? End Yes Yes Yes Yes No No No No

Slide 5

Run the Pascal ABC program from the icon on the desktop Main menu Go to - F10 Edit window Go from the main menu - Alt Output window Start to execute the program - F9

Slide 6

Type your first program in the editing window and launch it with the F9 button. program First; begin write("Hello, "); writeln("friends!"); writeln("This is the second line") end. The processes of compiling and launching a program for execution can be combined by calling the Run (F9) command immediately after typing the program text. Exiting the program is done using the Exit command in the File menu. Task 1. Write a program that displays the text on the screen: Important Do not confuse Write and Writeln! Let's check.

Slide 7

Task 2. Write a program that displays the phrase “Hello everyone!” 20 times - in a table of 5 rows by 4 columns. Clue. Use multiple spaces to set space between columns. Write only one write statement first? Which will display one phrase (don't forget about spaces). Then copy it 4 more times to get the whole line. At the end, don't forget to add a break to the next line (writeln). No need to copy begin and end! Let's check.

Programming in Pascal



In 1970, at least two great events occurred in the world of programming: operating system UNIX and new language programming, created by Professor Niklaus Wirth from the Swiss Federal Institute of Technology in Zurich. Wirth named it in honor of the great 17th century French mathematician and philosopher Blaise Pascal.

Niklaus Wirth

Blaise Pascal


Pascal language convenient for initial programming training, not only

because it teaches how to write a program correctly, but also how to correctly

develop methods for solving programming problems


  • uppercase and lowercase letters of the Latin alphabet from A to z, as well as the underscore (_), which also counts as a letter.
  • Uppercase and lowercase letters are interchangeable (equal meaning);
  • Arabic numerals 0 1 2 3 4 5 6 7 8 9 ;
  • special single characters: + – * / = . , : ; ^ $ # @ ;
  • special paired signs: () { } ;
  • compound signs: = .. (* *) (..) .

Program structure

The Pascal program consists of:

// Heading (optional part)


  • Description of marks;
  • Definition of constants;
  • Definition of types;
  • Description of variables;
  • Description of procedures and functions.

  • begin { start of the program }
  • { program body }
  • end. { end of program }

Program structure

Program program name; ( program title }

Uses …; (module connection section)

Label; { tag description section }

Const; { constant description section }

Toure; { type definition section }

Var; { variable description section }

Function; Procedure; { section describing functions and procedures }

... { operators section }


What does the program consist of?

Constant – a constant quantity that has a name.

Variable – a changing quantity that has a name (memory cell).

Procedure – an auxiliary algorithm that describes some actions (drawing a circle).

Function – an auxiliary algorithm for performing calculations (calculating the square root, sin) .


Constants

i2 = 45; { integer }

pi = 3.14; { real number }

q = " Vasya "; { character string }

L = True; { logical value }

whole and fraction separated by a dot

You can use Russian letters!

can take two meanings:

  • True (true, “yes”) False (false, “no”)
  • True (truth, “yes”)
  • False (false, “no”)

Variables

Variable types:

  • integer ( whole ) real ( real ) char ( one character ) string ( character string ) boolean ( logical }
  • integer ( whole }
  • real( real }
  • char( one character }
  • string ( character string }
  • boolean ( logical }

Declaring Variables ( memory allocation ) :

variable– variable

type - integers

var a, b, c: integer ;

list of variable names


Example program

write(‘ This is my first program ! ’);

Run the program and view the result.


Inference operator

Write(‘ text ’); - operator for displaying text and variables on the screen (leaves the cursor on the current line);

Writeln(‘ text ’); - operator for displaying text and variables on the screen (moves the cursor to a new line);


Exercise

  • Display the following text on the screen:

Hi all!

I best programmer SSH No. 3!

Please note that the text is displayed on two different lines.



Calculate mathematical expressions in ABC Pascal


  • Priority of operations in ABC Pascal the same as in mathematics.
  • You just need to learn how to correctly write mathematical expressions in the language Pascal

Arithmetic operations

Operation

Name

Addition

Subtraction

Multiplication

Division (real type only)

A div B

Calculation of the integer part (incomplete quotient)

Calculating the remainder

Calculate:

10 div 3 18 mod 4


Examples

Mathematical record

Recording in language Pascal

37(25+87,5)-17(4,6+1,9)

37*(25+87.5)-17*(4.6+1.9)

(a +2* b-3*c)/(5*a+4)

(a+b)/(a-b)+a*b/3.14

Decimal point in Pascal denoted by a dot


Standard Features

Pascal's function

Mathematical notation

Name

Absolute value of the number X (modulus)

Squaring a number

Exhibitor

Calculating the square root

Calculates the fractional part of a number

Rounds to the nearest whole number

Cuts off the fractional part

Define result:

Frac(16.68); Round(16.68); Trunc(16.68);


Standard Features

Pascal's function

Mathematical notation

Name

Sine calculation

Cosine calculation

The integer part of number

Calculating the natural logarithm

Raising a number to a power

Returns a random number in the range from 0 to X

Number π


Degrees in Pascal need to be converted to radians

Recording in language Pascal

Mathematical notation


PL Operators Pascal ABC


:= expression; An arithmetic expression can include constants, variable names, arithmetic operations signs: constants, variable names, arithmetic operations signs: + - * / div mod+ - * / div mod function calls parentheses () function calls parentheses () division integer multiplication remainder of division division" width="640"

Assignment operator

variable name := expression ;

An arithmetic expression may include

  • constants names of variables signs of arithmetic operations:
  • constants
  • variable names
  • signs of arithmetic operations:

+ - * / div mod

  • + - * / div mod
  • function calls parentheses ()
  • function calls
  • round brackets ()

complete division

multiplication

remainder of the division


Which operators are incorrect?

program qq;

var a, b: integer;

x, y: real;

10 := x;

y:= 7 , 8;

b:= 2.5;

x:= 2*(a + y);

a:= b + x;

the variable name must be to the left of the sign :=

the integer and fractional parts are separated dot

You cannot write a real value to an integer variable


Input operator

read(a); { entering a variable value a)

read(a, b); { entering variable values a And b)

How to enter two numbers?

separated by space:

through Enter :


Inference operator

write(a); { output variable value a)

write ln (a); { output variable value a And move to new line }

writeln(" Hello! "); { text output }

writeln(" Answer: ", c); { output text and variable value c)

writeln(a, "+", b, "=", c);


Adding two numbers

Task. Enter two integers and display their sum.

The simplest solution:

program qq;

var a, b, c: integer;

read(a, b);

c:= a + b;

writeln(c);


Complete solution

program qq;

var a, b, c: integer;

writeln(" Enter two integers ");

read(a, b);

c:= a + b;

writeln(a, "+", b, "=", c);

computer

Protocol :

Enter two integers

25+30=55

user



CALCULATE:

12 div 4 =

1 9 div 5 =

12 mod 3 =

1 36 mod 10 =


On Pascal

In the language of mathematics

Modulus of number x

Squaring x

Trunc(x)

e X

Round(x)

Fractional part calculation

Square root of x

Rounds to the nearest whole number

Random(x)

Cuts off the fractional part

Sine x

Exp/y*ln(x))

Returns a random number from 0 to x

Cosine x

[ X ]

X at

Ln x


Homework

1. Calculate the circumference and area of ​​a circle at a given radius

2. Calculate the perimeter of a right triangle from its legs




Conditional operator ( full form )

full form of branching

condition

Action1

Action2

conclusion


then begin (what to do if the condition is true) end else begin (what to do if the condition is false) end; Features: a semicolon is NOT placed before else begin and end a semicolon is NOT placed before else if there is one statement in the block, you can remove the words begin and end" width="640"

Conditional operator (long form)

if condition then begin

{ }

else begin

{ what to do if the condition is false }

Peculiarities:

  • before else NOT put a semicolon if there is one statement in the block, you can remove the words begin And end
  • before else NOT a semicolon is added
  • if there is one statement in the block, you can remove the words begin And end

Conditional operator (not full form )

incomplete branching form

condition

Action

conclusion


then begin (what to do if the condition is true) end; Features: if there is one statement in the block, you can remove the words begin and end; if there is one statement in the block, you can remove the words begin and end" width="640"

Conditional operator (incomplete form)

if condition then begin

{ what to do if the condition is true }

Peculiarities:

  • if there is one statement in the block, you can remove the words begin And end
  • if there is one statement in the block, you can remove the words begin And end


Homework

  • Write a program that decreases the first number by a factor of five if it is greater than the second.

2. Write a program in which the value of the variable With calculated by the formula: a+b , If A odd And a*b , If A even .



b then c:= a + b else c:= b – a;" width="640"

Homework

1. Write a program to solve the problem:

A). The value of x is known. Calculate y if

b). The coordinates of the point are given. Find out whether this point lies in the 3rd coordinate quadrant?

2. Determine the value of the variable c after executing the following program fragment:

a:= 6 ;

b:= 15 ;

a:= b – a*2;

if a b then

c:= a + b

else c:= b – a;




Cycle - This is the repeated execution of the same sequence of actions.

  • cycle with famous number of steps ( loop with parameter ) cycle with unknown number of steps ( loop with condition )
  • cycle with famous number of steps ( loop with parameter )
  • cycle with unknown number of steps ( loop with condition )



:= start value to end value do begin (loop body) end; Decreasing a variable by 1 (step -1): for variable:= initial value downto final value do begin (loop body) end;" width="640"

Increment a variable by 1 (step 1):

for variable := initial value to

final value do begin

{ loop body }

Decreasing a variable by 1 (step 1) :

for variable := initial value downto

final value do begin

{ loop body }


Peculiarities:

  • integer ) to ) or -1 ( downto ) begin And end you don't have to write: to ) is never executed (
  • a loop variable can only be an integer ( integer )
  • the loop variable change step is always 1 ( to ) or -1 ( downto )
  • if there is only one statement in the body of the loop, the words begin And end you don't have to write:
  • if the final value is less than the initial value, loop ( to ) is never executed ( checking the condition at the beginning of the loop, loop with precondition)

for i:= 1 to 8 do

writeln( " Hello " );


  • It is not allowed to change a loop variable in the body of a loop
  • when changing the start and end values ​​inside the loop, the number of steps will not change:

for i:= 1 to n do begin

writeln( " Hello " );

n:= n + 1;

no looping




do begin (loop body) end; Features: can be used difficult conditions: if there is only one operator in the body of the loop, the words begin and end need not be written: complex conditions can be used: if there is only one operator in the body of the loop, the words begin and end need not be written: while (a d o begin ( body of the loop ) end; while a d o a := a + 1;" width="640"

while condition do begin

{ loop body }

Peculiarities:

  • you can use complex conditions: if there is only one operator in the loop body, the words begin And end you don't have to write:
  • You can use complex conditions:
  • if there is only one statement in the body of the loop, the words begin And end you don't have to write:

while (a d o begin

{ loop body }

while a d o

a:= a + 1;


b d o a:= a – b; a:= 4; b:= 6; while a d o d:= a + b;" width="640"
  • the condition is recalculated each time the loop is entered
  • if the condition at the entrance to the loop is false, the loop is never executed
  • if the condition never becomes false, the program loops

a:= 4; b:= 6;

while a b d o

a:= a – b;

a:= 4; b:= 6;

while a d o

d:= a + b;




until condition " width="640"

Loop with postcondition is a loop in which a condition test is performed at the end of the loop.

loop body

until condition


TASK

Find the sum of squares of all natural numbers from 1 to 100. Let's solve this problem using all three types of loops.


"Bye" .

Program qq;

var a, s: integer;

s:=s+a*a;

writeln(s);


100 ; writeln(s); end." width="640"

"Before"

Program qq;

var a, s: integer;

s:=s+a*a;

until a 100 ;

writeln(s);


"With parameter"

Program qq;

var a, s: integer;

for a:=1 to 100 do

s:=s+a*a;

writeln(s);


Task.

Display squares and cubes of integers from 1 to 8.

Peculiarity:

The same actions are performed 8 times.


"cycle" block

i 1 := i * i;

i 2 := i 1 * i;

loop body

i, i 1 , i 2


Program

program qq;

var i, i1, i2: integer;

for i:=1 to 8 do begin

i1:= i*i;

i2:= i1*i;

writeln(i, i1, i2);

initial value

variable

final value


Loop with decreasing variable

Task. Display squares and cubes of integers from 8 to 1 (in reverse order).

Peculiarity: the loop variable should decrease.

Solution:

for i:=8 1 do begin

i1:= i*i;

i2:= i1*i;

writeln(i, i1, i2);

down to




Array is a group of similar elements that have a common name and are located side by side in memory.

Peculiarities:

  • all elements are of the same type the entire array has the same name
  • all elements are of the same type
  • the entire array has the same name
  • all elements are located nearby in memory

Examples:

  • list of students in class apartments in a house schools in the city
  • list of students in class
  • apartments in a house
  • schools in the city
  • annual air temperature data

NUMBER array element

(INDEX)

array

MEANING array element

NUMBER (INDEX) array elements: 2

MEANING array elements: 10


Declaring Arrays

Why announce?

  • define Name array define type array define number of elements highlight place in memory
  • define Name array
  • define type array
  • define number of elements
  • highlight place in memory

Array of integers:

Size via constant:

elements

ending index

starting index

var A : array[ 1 .. 5 ] of integer ;

var A: array of integer ;

const N=5;


What is wrong?

var a: array of integer;

A := 4.5;

var a: array ["z".."a"] of integer;

A["B"] := 15;

["a".."z"]

var a: array of integer;

A := "X";


Announcement:

Keyboard input:

Element-wise operations:

Output on display:

const N = 5;

var a: array of integer;

i: integer;

a =

a =

a =

a =

a =

for i:=1 to N do begin

write("a[", i, "]=");

read(a[i]);

Why write ?

for i:=1 to N do a[i]:=a[i]*2;

writeln(" Array A:");

for i:=1 to N do write(a[i]:4);

Array A:

1 0 24 68 112 26


Task:

1. Enter c keyboard array of 5 elements, find the arithmetic mean of all elements of the array.

Example:

Enter five numbers:

4 15 3 10 14

arithmetic average 9.200

SOLUTION:


Program qq;

var N: array of integer;

for i:=1 to 5 do begin

write("N[",i,"]");

for i:=1 to 5 do begin

write(" average", k:6:2);

1 slide

PASKAL Belyakova Natalya Aleksandrovna Teacher of computer science, technology and fine arts, MBOU secondary school No. 6, Kholmsk, Sakhalin region Pascal ABC

2 slide

3 slide

Data Type REAL If a number has a comma and is a fraction, then it is called REAL. To store real numbers, Pascal uses a special data type – REAL. To enter them into the program, use the VAR (variable) operator EXAMPLE: program p15 ; VAR a, b, c: REAL ; Begin and stuff……….

4 slide

REAL variables: program summa ; VAR A, B, C: REAL ; Begin A:= 3.5; B:= 7.6; C:=A + B; writeln("sum = ", c) ; End. _______________________________________ All real numbers are written not with a comma, but with a dot!!!

5 slide

Formats for writing real variables: Normal form: 0.7 can be written as 0.7 or .7 -2.1 can be written as -2.1 Notation with exponent: A number is represented as a mantissa (the fractional part of a number) multiplied by 10 to some power 2700 = 2.7*10 The number 10 is written as the letter E, followed by the power: 2.7E3 0.002 = 2*10 The number 10 is written as the letter E, followed by the power: 2E-3 3 - 3

6 slide

REAL variables: program z16 ; var a, b, c: real; begin a:= 17.3; b:= 3.4; c:=a+b; writeln("addition A+B = ", c); c:=a-b; writeln("subtract A-B = ", c); c:=a*b; writeln("multiply A*B = ", c); c:=a/b; writeln("division A/B = ", c); End.

7 slide

REAL type functions: PROGRAM Z18 ; VAR A, B: REAL; BEGIN A:= 2.0 ; (square root calculation) B:= SQRT(A); WRITELN (Square root (Sqrt (A)) = ", B) ; (sine calculation) B:= SIN (A); WRITELN ('sine of number (SIN (A) = ", B) ; (cosine calculation) B: = COS (A); WRITELN ('cosine of number (COS (A) = ", B) ;

8 slide

(calculate arctangent) B:= ARCTAN (A); WRITELN (arctangent of the number (Arctan (A)) = ", B) ; (calculation of the logarithm) B:= LN (A); WRITELN ('logarithm of the number (LN (A) = ", B) ; (raising the number E to the power A) B:= EXP (A); WRITELN ('exponent to the power of A (EXP (A) = ", B) ; (calculation of Pi) B:= PI; WRITELN ('pi number (Pi) = ", B ) ; End.

Slide 9

(calculate arctangent) B:= ARCTAN (A); WRITELN ('arctangent of the number (Arctan (A)) = ", B); _______________________________ The output of a real number can be specified. For the value of the variable “B” we set 6 digits, of which 4 are after the decimal point: (calculation of the arctangent) B:= ARCTAN (A ); WRITELN ('arctangent of number (Arctan (A)) = ", B: 6: 4) ; _______________________________

10 slide

The main operators of the system: Program name program Beginning and End Begin and End. Variables VAR Integer integer Real number real Output to the screen Write(‘x= ‘, x) Output to the screen with new line Writeln('x= ', x) Modulus of the number Abs (x) Squaring Sqr(x) Square root of the number Sqrt(x) Sine of the number Sin (x) Cosine of the number Cos (x) Arctangent of the number Arctan(x) Logarithm of the number Ln (x) Raising a number to the power of X Exp (x) Calculating the number Pi Pi

11 slide

TASK: z15) Assuming that the operation of multiplication and the operation of squaring have the same complexity, write the optimal expression: Z15a) Z15b) Z15c) Z15d) Z15e) Z16) Type a problem on basic arithmetic operations (sample in notebook) Z17) Calculate the expression : Z18) Type a calculation problem standard features numbers d:=8 (modulus, square root, square of a number, sine, cosine, tangent, arctangent, cotangent, logarithm of a number) Z19) Write a program to calculate the discriminant of a quadratic equation. Set the coefficients in the program using the assignment operator Z20) Calculate the expression:

12 slide

Z21) Given the diameter of the circle d. Find its length () Z22) Given the length of the edges of the cube, a, b, c of the rectangular parallelepiped. Find its volume and surface area Z23) Find the circumference L and area of ​​a circle S of a given radius R: L=2πR, S = πR Z24) Given 2 numbers a and b. Find their arithmetic mean Z25) Given 2 non-negative numbers a and b. Find their geometric mean (square root of their product) Z26) Find the distance between two points with given coordinates x1 and x2 on the number axis: |x2 - x1|. 2

Slide 13

Literature: M. E. Abrahamyan. Programming Taskbook. Electronic problem book on programming. Version 4.6./ Rostov-on-Don - 2007 2. Ushakov D.M., Yurkova T.A. Pascal for schoolchildren. St. Petersburg: Peter, 2010. - 256 p.

Slide 2

Program structure

A Pascal ABC program has the following form: program program name; module connection section description section begin operators end. The first line is called the program header and is optional. The module connection section begins with function word uses followed by a comma-separated list of module names. The description section may include sections describing variables, constants, types, procedures and functions, which follow each other in any order. The module connection section and description section may be missing. Operators are separated from each other by the semicolon character.

Slide 3

program program name;uses module connection sectionvar descriptions sectionbegin operatorsend.

Slide 4

Program - Program; Uses – Use; Var – description; Begin - Beginning; End - The end.

Slide 5

Slide 6

Slide 7

Slide 8

Slide 9

Slide 10

Slide 11

Slide 12

The uses command will open in a separate window.

  • Slide 13

    Let's write our first program: Let's give our program a name, it should be written in Latin letters, and should not start with a number. Each statement ends with - ; Write is a command to output to the viewport.

    Slide 14

    Task 1.

    Let's display the greeting: "Good afternoon." Programpriml; (optional element of the program The name of this program is prim1 (note that the program name must not contain spaces, it must begin with a letter, consist only of Latin letters, numbers and some symbols, dots and commas are not allowed). There is no descriptive part , and immediately there is a section of operators, starting with the service word begin in TurboPascal 7.0, after which comes the language operator)begin (Output the text) writeln("Good afternoon"); (At the end of the program in TurboPascal 7.0 the end operator is required.)end.

    Slide 15

    Program priml; begin writeln("Good afternoon");end.

    Slide 16

    Task 2. Entering the value of the variable N from the keyboard

    programInp; uses Crt; var N: integer; beginClrScr; write("Enter a number from the keyboard:"); readln(N); (Here the program will pause and wait for input from the keyboard. Type a number on the keyboard, for example 153, and press Enter) writeln("You entered a number ", N); readln ( This is the empty input statement. Here the program will pause again and wait for the Enter key to be pressed. During this time, you will have time to view the output on the screen.) end.

    Slide 17

    programInp; usesCrt; var N: integer; beginClrScr; write("Enter a number from the keyboard:"); readln(N); writeln("You entered a number ", N); readlnend.

    Slide 18

    Calculation of body speed when falling from a tower

    Program Piza; const (This is the constants section. It comes before the var section) G=9.8; (The type of a constant is determined automatically, based on the form of the number. In this case, due to the presence of a decimal point, it is a real type) var V,H: real; begin write("Enter the height of the tower:"); readln(H); V:=Sqrt(2*G*H); writeln("Falling speed", V:6:3): (To prevent the text and number from sticking together, a space is added after the text inside the apostrophes) readln end.

    Slide 19

    ProgramPiza; constcrt; G=9.8; var V,H,N:real; begin clrscr; write("Enter tower height:"); readln(H); V:=Sqrt(2*G*H); writeln("Falling speed",V:6:3): readlnend. crt, clrscr; - screen cleaning

    Slide 20

    Slide 21

    Pascal ABC system

    The Pascal ABC system is designed for teaching programming in the Pascal language and is aimed at schoolchildren and junior students. According to the authors, initial programming training should take place in fairly simple and friendly environments, at the same time, these environments should be close to standard in terms of programming language capabilities and have fairly rich and modern libraries of standard routines. The Pascal language is recognized by many Russian teachers as one of the best for initial learning. However, the MS DOS-oriented BorlandPascal environment is outdated, and the BorlandDelphi environment with its rich capabilities is difficult for a novice programmer. Thus, an attempt to start learning by writing an event program in Borland Delphi causes a lot of difficulties for the student and leads to a number of incorrectly formed skills. The Pascal ABC system is based on the DelphiPascal language and is designed to make a gradual transition from the simplest programs to modular, object-oriented, event-based and component programming. Some language constructs in Pascal ABC allow, along with the main one, simplified use, which allows them to be used at the early stages of learning. For example, modules may not have an interface section and an implementation section. In this case, the modules are structured in almost the same way as the main program, which allows you to start studying them in parallel with the topic “Procedures and Functions”. Method bodies can be defined directly inside classes (in the style of Java and C#), which allows you to create classes almost immediately after learning the records, procedures and functions. A number of system modules Pascal programming ABC was specially created for educational purposes: Module raster graphics GraphABC does without objects, although its capabilities are almost the same as graphic capabilities BorlandDelphi. It is available in non-event programs and allows you to easily create flicker-free animations. The Events module allows you to create simple event programs without using objects (events are ordinary procedural variables). The Timers and Sounds modules allow you to create timers and sounds, which are also implemented in a procedural style. These modules can even be used in console programs. The container class module Containers allows you to work with basic data structures ( dynamic arrays, stacks, queues, sets), implemented as classes. Module vector graphics ABCObjects is designed for quickly learning the basics of object-oriented programming, and also allows you to create quite complex game and educational programs. The VCL Visual Components module allows you to create event-driven applications main form in Delphi style. VCL classes are a bit simplified compared to similar Delphi classes. There is a form editor and an object inspector. The technology for restoring a form using program code makes it possible to use just one file for an application with the main form (!). Pascal's ABC language provides typed pointer arithmetic (C-style) as well as a complex type for working with complex numbers. 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 is approximately 20 times slower than the speed of the same program compiled in the BorlandPascal environment, and 50 times slower than the same program compiled in the BorlandDelphi environment. In the Pascal ABC system, a student can perform so-called verifiable tasks, which ensure the formulation of a problem with random initial data, control of input-output operations, verification of the correctness of the solution, as well as maintaining a record of problem solving. The tested tasks are implemented in the form of an electronic programming problem book, ProgrammingTaskbook, containing 1000 programming tasks of varying levels of complexity (from the simplest problems to problems involving files, pointers and recursion) as well as in the form of executors Robot and Draftsman, intended for quickly teaching the basics of programming to junior and high school students. middle classes. The freely distributed version of Pascal ABC & ProgrammingTaskbookMiniEdition includes a mini-version of the electronic problem book (200 tasks) and a stripped-down set of tasks for Robot and Draftsman performers. Pascal ABC & ProgrammingTaskbookCompleteEdition contains a complete set of tasks.