: turbo-pascal 7.x


: turbo-pascal 7.x

...................................................... 7

1. ............................. 9

1.1. ........... 9

1.2.

........................................................ 12

1.2.1. ..................... 12

1.2.2. ........ 13

1.2.3. TURBO-PASCAL 6.0\7. ................ 16

1.3. ...................................... 17

1.3.1. ...................................... 17

1.3.2. ... 18

1.3.3. - ..................... 18

2. ....................................... 20

2.1. ....................... 20

2.2. .................................... 22

2.3. .................... 25

2.3.1. ................................................. 25

2.3.2. ................................................ 26

2.3.3. ............................................... 28

3. ......................................... 30

3.1. ........................................... 30

3.2. ................................ 31

3.3. ............................ 32

3.4. ........................ 38

3.5. ......................................... 39

3.6. ................................ 39

4. ........................................ 41

4.1. ..................................... 41

4.2. ....................................... 41

4.2.1. ................................... 41

4.2.2. ..... 42

4.3. ..................................... 42

5. ................................... 45

5.1. ................ 45

5.2. ................................. 45

5.3. .................................... 46

5.4. ................................ 46

6. ...................................... 47

6.1. .................................... 47

6.2. ............................. 47

6.3. ..................................... 47

6.4. ...................................... 48

7. ............... 49

8. ޠ .

.................................................. 51

8.1. ........................... 51

8.2. ................................... 54

9. .

-

.................................... 57

9.1. - ... 57

9.2. - ..... 57

9.2.1. ................ 57

9.2.2. ................................ 59

9.2.3. .............................................. 60

9.2.4. ........................................... 60

9.2.5. .................................................... 61

9.3. ........................ 61

9.4. ........................................ 62

9.5. -

................................... 62

9.5.1. ......................................... 62

9.5.2. .................................... 63

9.5.3. ........... 63

9.6.

.................................................. 65

9.7. ............................... 65

9.8. ........................ 66

.................................................... 68

.............................. 69

1 ................................. 70

2 ..................................... 107

3 ................................ 157

- . . . - - , .

- . . , , , , , , , , , .

. , .

50- , / . 40- . , , , . , . . , : , - . , . , . , !. .

, . , , , , , , , - .

- : , - (, , ), , .

- . , . , , " ", " ", "", " " ...

, . . " Turbo-Pascal". , . . . , , . , .

. "" , , .

, , ' " , .

1. 

1.1. 

, . , , , , , , , - , , . , , .

. 50- . "" / -. , , . - , , : /. .

70- . PLATOIY. , , , . , . . , - : , . , .

80- "". , , - , , , . 32 , . , . . , , , , , , , . . , "", "", "" , . - . ,. , , . . . () . , . .. . "" , , , , . x . . - . "" "" . "" a- , . , , . "" "" , , . . . -- . . , , , . " " [1].

1991 1994 " ", 150 IBM PC

. , [2] : , , . . , , . "", "", "", "" .. , . , . , , , , .. ... , , . .

:

1) ;

2) - (, , );

3) ;

4) ;

5) ;

. , , , 10 . 1992 , . , , TV- . , (""). - , , . ( PCX) , ( FLI), ( DOS) , PAL/SECAM. , . Turbo-Pascal Turbo Vision :

1) " ". * , , , . .

2) "". . .

3) " " . FLI Autodesk Animator . . "" - , "".

- - . [3]

- . , , . . - .

1.2.

1.2.1.

. - . , .

. , . , . . - . " ", . - . " ", " -", " , " ..

, , , , . . , . . . , "", " ". . , . , , , .

. .

1.2.2.

. " Turbo-Pascal".

. . , . . , .

. . 3-7 , . . . . . . . , "", "", "". .

. , .

Turbo-Pascal 7 :

1) ;

2) ;

3) ;

4) ;

5) ;

6) ;

7) ;

. , Turbo-Pascal-, . , UnitGraph, , CloseGraph, . , . . .

. . . . , . , , , .

. , , , , . , .

. : , , . . , , . .

. . . . " ". . . . . , , , . .

. , , . . . , : ( ), ( 12 ) , . .

. , , , , , . . . . .

" ". , ( ) ( ). . , , , . OutText OutTextXY. . Turbo-Pascal, , . .

, . , . , , , , . . . 50x50 . , . Sound NoSound. .

Pascal , IBM PC. 40 . , , .

1.2.3. TURBO-PASCAL 6.0\7.0

Pascal . Turbo-Pascal 80- Borland International (). Turbo - -. Turbo-Pascal - Pascal IBM, , , . Turbo-Pascal . IBM . : Pascal, Borland. , , ., , , - , ... , , , , , .

, 3.0, 4.0, 5.0, 5.5, 6.0, 7.0. , , , , . Turbo-Pascal - , , . , , .

Turbo-Pascal 7.0 . 6.0 , "", - , , - Turbo-Vision - ..

Turbo-Pascal 7.0 MS DOS . :

1) - , , , , .., , ;

2) ;

3) , ;

4) , , , -, ... , , MS DOS Windows, , Pascal , ;

5) ;

6) ;

7) - ;

8) ( -, , , - ..);

9) Turbo Vision; 10) .

1.3.

1.3.1.

Turbo-Pascal 6.0/7.0 , - . :

1)

2) 7 :

-

-

-

-

-

-

-

3) ,

4)

5)

6)

7)

8) 45

9) Turbo-Pascal , 6...

1.3.2.

IBM , EGA, 256 , 640x350 , 16 ( ).

DOS, Turbo-Pascal 7.O.

1.3.3. -

. . , , .

. , , " Turbo-Pascal". - ( ) , . . , . . . . . . " + " .

. , . , IBM PC Turbo-Pascal. Turbo-Pascal. . , , , , .

. . , . . .

2.

2.1.

1992 Borland International , -Borland Pascal 7.0 Turbo Pascal 7.O. : MS DOS, MS DOS Windows. - 30 2 . Turbo-Pascal 7.0 MS DOS. , IBM

Turbo-Pascal - IBM , , . , , , , -, ..

Turbo-Pascal .0\7.0 , . [4], [5] [6]

TURBO-PASCAL . Graph, Crt, .

Graph , , , (CGA, MCGA, EGA, VGA, Hercules, AT&T400, 3270PC,IBM8514). "" - , . : X Y. . EGA EGAHi 640x350, 16 . . . , , .

Graph 8 , , , , , , , , . [5].

:

1) ;

2) ;

3) , , ;

4) ;

5) ;

6) ;

7) ;

8) ;

9) ;

10) ;

11) ;

12) ;

13) ;

Graph ࠠ ^ UnitGraph.

Crt , , . -, , Crt BIOS , . , , . , . , :

1) ;

2) ;

3) ;

4) .

, Random, Randomize , System.

, , 7 :

1 - ;

2 - ;

3 - ;

4 - ;

5 - ;

6 - ;

7 - ;

, , , , , , . 5,6 , , . , . . , . , .

, . . , , . , , , . . 3,4,5,6,7 . . , .

, .

2.2.

17 , - 3,4,5,6,7 - . . 1

1

1 Razdel1 Razdel10 Raztex1 - -
2 Razdel2 Razdel20 Raztex2 - -
3 Razdel3 Razdel30 Raztex3 Joing Iod
4 Razdel4 Razdel40 Raztex4 Joi Iodi
5 Razdel5 Razdel50 Raztex5 Join Iodin
6 Razdel6 Razdel60 Raztex6 Jois Iodis
7 Razdel7 Razdel70 Raztex7 jos ios

2, 3, 4

2

.

1 2
... ...
* procedure DrawPoly(NumPoints:word;
* var PolyPoints);
7

.

NumPoints - PolyPoints - , NumPoints+1 ( ).

* procedure FillPoly(NumPoints:word;var PolyPoints);
8 . NumPoints PolyPoints , DrawPoly.
... ...
0

1 - : * -

7,8 -

-

2 - .

3

.

1 2 3
... ... ...
* 02 ͭ ?

1 Bar3D(X1, Y1, X@, Y2, depth, true);

SetViewPort(X1, Y1, X@, Y2, false);

ClearViewPort;

Bar3D(X1, Y1, X@, Y2, depth, false);

2 Bar3D(X1, Y1, X@, Y2, depth, true);

SetViewPort(X1, Y1, X@, Y2, true);

ClearViewPort;

Bar3D(X1, Y1, X@, Y2, depth, false);

3 Bar3D(X1, Y1, X@, Y2, depth, true);

Bar3D(X1, Y1, X@, Y2, depth, false);

4 Bar3D(X1, Y1, X@, Y2, depth, true);

Bar3D(X1, Y1, X@, Y2, depth, true);

*
... ...
0

4

1 2 4 5

SetViewPort. 002

Bar3D

.

*

1 3 . 005
*
4 . . 003
*
... ... ... ...
0

1 - : * -

1 -

-

2 - .

- : 1,2,3,4 - .

* -

4 - .

5 - .

2.3.

2.3.1.

. , . .

- 1 . . CASE. 1 .5

5

1
0 1 ,
1 2, [ , 3-7.

 

*

1

() . , . . () . , 1 '*'. SetColor CASE '*' RAZDELXO .

 

# RAZDEL6, RAZDEL7, CASE . .

 

ASCII-

-

CASE . , . , .

 

- 2 - 69 . , 32 . , 32 .. . 32 . - . , , . ( ) "" , 32 . , 1 .

:

1) 1 1 . ;

2) 2 69 . , , 69, "" "" , 69 ;

3) , () ;

4) , ;

5) - . ;

5) '0' 1. 2 ;

6) ( END 70);

2.3.2.

, 3,4,5,6,7 . .

1 . . .6

6

1

1
0 .
* ( ) .
ASCII- CASE . . , . , . .

- 2. . 01 99. 2 , ( ) , 1 .

- - 69 . 2 69 , 69, "" "".

, . . , , .. 32 , , , .... "" .

:

1) 1 1 . ;

2) 2 2 ;

3) 69 . , , 69, "" "" , 69 ;

4) , 2 '*' , 1;

5) - 1 . ;

6) '0' 1. ;

7) ( END 72);

2.3.3.

. - 1 - , . 1 .7

7

1

1
0 .
* ( ) .
ASCII- CASE . , . , .

2 01 99. 2 . , 2 , , 1.

- . . 1,2,3,4 - . . , . . , , - 4 '*' .

4 . 68 . .

5 - . 3 . ASCIIZ- string. : 001, 002, 003, 004, 005. 5 , .

, , , , .. 32 .

:

1) 1 1 . ;

2) 2 2 ;

3) 68 . , , 68, "" "" , 68 ;

4) '*' , ;

5) , 1 . , .. .

6) - 1 . ;

7) '1 1. ;

8) ( END 76);

. . . , , ..

3.

3.1.

Turbo-Pascal. , / , " ". Turbo-Pascal. . . - , . , , . , . .1.2.3 .

"" . , "Graphic", Razdel1, Razdel2, Razdel3, Razdel4, Razdel5, Razdel6, Razdel7, MyBook.

, Veden, , , , Razdel1 Razdel7, , , , " " . . NOMER3 - NOMER7 Razdel3 Razdel7 . , , " ".

Razdel1 Razdel7 Razdel10 - Razdel70 . , , , , , . . . .

, , . . . Raztex1, Raztex2, Raztex3, Raztex4, Raztex5, Raztex6, Raztex7 . Veden . , Razdel3 Razdel7 , Joing, Joi, Join, Jois, Jos, , lod, lodi, lodin, lodis, los. . , , , , .2.

MyBook . , . OKNO - , . OKN01 " ". GraphRegim . . Diogramraa 5 .

. : IBM , EGA, 256 , 640x350 , 16 . DOS, Turbo-Pascal 7.0, bold.chr, goth.chr, sans.chr, trip.chr , , , . , , "Graphic". , . " ".

3.2.

- , Turbo-Pascal .

, . :

1) .

2) .

3) .

4) .

5) .

6) .

7) .

, , . . , . 3-7 . , , .. - .

. , . , , , . . , , . . . , . - . .

3.3.

"" "Graphic" , , . ,3.1. . . 1 "Graphic" Razdel1 Razdel7. , , , , .

. . , CASE. . , , . " ". - - , , . . , REZ3 - REZ7. 3.6.

. 2 . 3 .


. 1


. 2


. 3

1 - . , "", , . .

2 - Windo1. . 1-4,7 .

3 - . : - , - , - , .. . VERTIKALNOE_MENU , . . , . , .. CASE. CASE , , REGIME VERTIKALNOE__MENU. 1 - 9 . . , REGIME 1 - 7 , . - 5 . REGIME 8, 4 . REGIME 9 , .

4 - . CASE. , REGIME 8. . writeln , . 3.6. .

5 - . - . - RAZPEH, RAZDEL2, RAZDEL3, RAZDEL4, RAZDEL5, RAZDEL6, RAZ0EL7. " ". . .

"" : " Y/N ? " ""("") . . .

, .

1 - GraphRegim. . .

2-8 .

2 - . . 2.2. , .

3, 13 - . MYBOOK . .

4 - . 2 . 31 . 31 , 31 1 . REPEAT . RAZDEL6-7 # . CASE( ) . , .. .

5 - . CASE. 1. . / REPEAT .

6 - . OutTextXY.

7 - . 31 .

8 - . REPEAT. 1 "0". .

9 -24 .

9 - . , RAZDEL1 RAZDEL2 , 8 , 9 . , , "" 10.

10 - OKNO1 . MYBOOK " ".

11 - . . RANDOMIZE Random, . [0..3] . .

12 - . , , .

14 - . . 2 [0..3] . OutTextXY "*", 1.

15 - . "*" , "" 1. , . CASE.

16 - . outTextXY .

17 - . : " ___ " . 1,2,3 4. - , , . , .

18 - . , , .

19 - . If , . REPEAT "*" 1 . , .

20 21 - 15 16.

22 - . REZY 5 , . REZY . ballY[nomerX]. REZY .

23 - . ClearDevice.

24 - . , 14 . , .

3.4.

: IBM , EGA, 256 , 640x350 , 16 .

DOS, Turbo-Pascal 7.0, bold.chr, goth.chr, sans.chr, trip.chr.

3.5.

: graphic.exe, razdell.tpu, razde!2.tpu, razdelS.tpu, razde!4.tpu, razdelS.tpu, razde!6.tpu, razde!7.tpu, mybook.tpu, bold.chr, goth.chr, sans.chr, trip.chr , Pascal graph.tpu, egavga.bgi, : raztexl.pas, raztex2.pas, raztexS.pas, raztex4.pas, raztexS.pas, raztex6.pas, raztex7.pas - , joing.pas, iod.pas , joi.pas, iodi.pas, join.pas, iodin.pas, jois.pas, iodis.pas, jos.pas, ios.pas - .

. graphic.exe. 80 000 . IBM PC , , 640 . .

- .

3.6.

"", . , . . - . graphic.exe.

. - . . , - .

3 - 7 . . . . " " . .

. . , . . 8 , , .

NomerX - , . - 1 2.

REZY - , .

ballY[NomerX] - , . :

baUY[NomerX] :=REZY

Itog[NomerX] - . :

Itog[NomerX]:=ItogTNomerX3+baIlY[NomerX]

tog[NomerX] - , :

tog£NonterX3: =Round(Itog[NomerX]/K[NomerX]),

[NomerX] - , .

8

REZY NomerX BallY[NomerX] Itog[NomerX] Tog[NomerX]
RAZDEL30 REZ3 1 Ball3[1] Itog[1] Tog[1]
REZ3 2 Ball3[2] Itog[2] Itog[2]
RAZDEL40 REZ4 1 Ball4[1] Itog[1] Itog[1]
REZ4 2 Ball4[2] Itog[2] Itog[2]
RAZDEL50 REZ5 1 Ball5[1] Itog[1] Itog[1]
REZ5 2 Ball5[2] Itog[2] Itog[2]
RAZDEL60 REZ6 1 Ball6[1] Itog[1] Itog[1]
REZ6 2 Ball6[2] Itog[2] Itog[2]
RAZDEL70 REZ7 1 Ball7[1] Itog[1] Itog[1]
REZ7 2 Ball7[2] Itog[2] Itog[2]

4.

4.1.

Turbo-Pascal - . , , , .

" Turbo-Pascal" : , , , , , , . .

. " Turbo-Pascal" , . . . , . , . . . .

4.2.

4.2.1.

Turbo-Pascal 7.0 . IBM PC : EGA, 256 , 640x350 , 16 .

DOS , Turbo-Pascal 7.0 , bold.chr, goth.chr, sans.chr, trip.chr.

4-2.2.

"" . . graphic.exe. . : . . RE2X 5 , . / . . " ". . . 3.6.

4.3.

.

, . - "", -" ", , . " " Enter.

Enter. . . .

Enter. . 3. - . , 3.3 ,. . , 3 " ". Enter.

Enter. , . : . , , , . , , , . , . 3 .

Enter. " ". , Enter , .

. , . , . . , . : " ___". , . 1,2,3 4, Enter , . .

, Enter . . "" "" .

Enter . .

Enter . . " ". Enter. . - . 7 , - . " " ( "2"). "". " " . 1 "4".

" " Enter. , " ", " " "", (, "4"). , .. .

" ". , . . . " , Enter. " " " " (, "5") . "4".

Enter . . " ". " Y/N?" . "Y" "" . .

" ", "". , . , .

5.

5.1.

Turbo-Pascal . , turbo-, . :

1) .

2) .

3) .

4) .

5) .

6) .

7) .

graphic RAZTEX1-RAZTEX7.

: , , , . RAZTEX1-RAZTEX7 : , , , , .

IBM , EGA 256 , 640x350 , 16 . DOS, Turbo-Pascal 7.0 . 5.3.

5.2.

45 . . . . . " - " . . .

Turbo-Pascal . . , , . . ASCIIZ- Pascal , .

- - , .

5.3.

: graphic.exe, RAZDELl.tpu, RAZDEL2.tpu, RAZDEL3.tpu, RAZDEL4.tpu, RAZDELS.tpu, RAZDEL6.tpu, RAZDEL7.tpu, MYBOOK, bold.chr, goth.chr, sans.chr, trip.chr, Turbo-Pascal graph.tpu, egavga.bgi, : raztexl.pas, raztex2.pas, raztexS.pas, raztex4.pas, raztexS.pas, raztex6.pas, raztex7.pas - , joing.pas, iod.pas, joi.pas, iodi.pas, join.pas, iodin.pas, jois.pas, iodis.pas, jos.pas, ios.pas - .

. graphic.exe. . 80 000 , .

, , , , graph.tpu egavga.bgi . .

5.4.

. , .. . - . . , , . , " ". , . , . 3.6.

6.

6.1.

"" - Turbo-Pascal. , . . . 1.2.

6.2.

Turbo-Pascal 7.0 IBM . EGA 256 , 640x350 , 16 . .

DOS, Turbo-Pascal 7.0, - , : goth.chr, sans.chr, trip.chr, bold.chr, Turbo-Pascal - graph.tpu, egavga.bgi. "" - graphic.exe, - RAZDELl.tpu, RAZDEL2.tpu, RAZDELS.tpu, RAZDEL4.tpu, RAZDELS.tpu, RAZDEL6.tpu, RAZDEL7.tpu, - raztexl.pas, raztex2.pas, raztex3.pas, raztex4.pas, raztexS.pas, raztex6.pas, raztex7.pas, joing.pas, joi.pas, join.pas, jois.pas, jos.pas, iod.pas, iodi.pas, iodin.pas, iodis.pas, ios.pas.

6.3.

, , :

1) .

2) 6.2.

3) - , , Norton Commander.

4) Norton Commander. graphic.exe. . . .

5) "" Enter. .

6) " " "Y" "". Norton Commander .

7) Norton Commander . , .

6.4.

.

, " Y/N ?", , "Press ENTER to return to the Norton Commander". ENTER Norton Commander. .

, , "Runtime error 002 at 0125:04E5. Press ENTER to return to the Norton Commander". ENTER, Norton Commander, . , . , . . .

, , :"Runtime error 100 at 01B6:076. Press ENTER to return to the Norton Commander". ENTER, Norton Commander, .

, "Runtime error 100 at 0454:OOAF. Press ENTER to return to the Norton Commander" , , , . .

7.

TURBO-PASCAL 6.0\7.0. - 1,2,4,5,8 - "", " ", " ".

" -". : , , , , , , . , , , , . , . 3, 4, 5, 6 7 . , . 4 . . . " ". . . , , .

. - . , , .

. , .

" " . " TURBO-PASCAL", 1992 . . . , :

1) ;

2) -;

3) ;

4) .

5) , , ;

8. -

8.1.

- , , , . , . , , .

TURBO-PASCAL 6.0\7.0. , . , -. , : - - .

, , . : , , , . - . ai - , mi - , bi - . MOi Qi :

ai+4m+b;

M0i= --------- ,

6

bi-ai

Qi = --------- .

6

:

n

= Moi ,

I=1

n

Q = E Qi2

I=1

. 9

, .-.

ai mi bi MOi Qi MO Q
13 17 21 17,0 1,3
23 24 33 25,3 1,7 89,9 2,6
23 30 30 28,8 1,2
26 29 31 28,8 0,8

:

1) : , ;

2) : ;

3) : , , ;

4) : , , .

. 9 . 10

10

, .
1 - 1 3
2 - 3 14

. 10

, .
3 - 1 15
- 3 10,3

4 - 1 5
5 - 3 5
6 - 3 18,8
7 - 1 12,8
8 - 3 13
9 - 3 2

- 1 3 . 1 - 3 . .

.

. , . . 11

11

, .

3 7 17 26 38

1 ---
2

-------

-------

3

--------------

--------

4 ----
5 ----
6 -----------------------
7 -----------------
8 ------------------
9 --

8.2.

- . . , - 1 35 , - 3 35 - 3 - 28 . 20 . 20 . - 1 1 15 , - 3 - 1 15 , - - 1 8 . . 12

12

./.

- - , % - - , % , .
- 1 800 15 120 35 3 783 500
- 3 600 15 90 35
- 3 600 15 90 28

. 1000 .. 98 , 764 8- . 764 000 .. , 14%, 5%, 60% . . . 40 . 40 " ".

. 13

13

, . , %
764 000 764 000 7 476 465 10,0
3 787 500 50,2
529 690 7.0
189 175 2,5
40 000 0,3
2 270 100 30,0

9. .

-

9.1. -

. . :

1) - ;

2) - ;

3) ;

4) ;

5) - ;

- ,

- ,

- ;

6) ;

7) ;

8) .

. 10 . 30 . . 3,5 . :

1) (, , ) ;

2) ;

3) , , ;

4) , ;

5) ;

6) , , ;

7) ;

8) ;

9.2. -

9.2.1.

, .

12.1.005-76 ". " , , . , 1 . , 23,2 /(*). , . 14.

. 15 , . 16, . 17.

14

1 172 / (150 /)

, ,

15

, , % , /

(

+10 . )

20 - 23 60 - 40 0,2
( +10 ) 22 - 25 60 - 40 0,2

16

, , % , /,
19 - 25 75 0,2 15 - 26

17

, , % , /,
3 13 28 55, 27 60, 26 | 65, 25 70, 24 75 0,2 - 0,5 3 13

9.2.2.

, . , . - - , 0,5 /. . , - 0,15 /. .

9.2.3.

. 18 .

18

,
0,05 100 /
10 /. .

15/

15 /.

9.2.4.

-4-79 19.

19

/ -4-79/

, ,
. .
0,3 0,5 750 300 600 200

9.2.5.

12.1.003-83 .

20

, , , ,
63 125 250 500 1000 2000 4000 8000

-

71 61 54 49 45 42 40 38 50

9.3.

.

245-71 20 . . 30 ../ . L :

L = k * v, / ,

k - , 1 - 10 ( 2),

v - .

,

L =2 * 160 = 320 ./.

, , , .

9.4.

: . , , . III, . 400 . , , . , 40 013, 031, .

. 1.5 - 1.7 , , , .

9.5. -

9.5.1.

, , . , , .. , , , .

, , , 60% .

. , , , "" . .

9.5.2.

, , - . . (), :

1) , ;

2) , , ;

3) . :

- ;

- ;

- .

:

1) , , . , 0.3 - 0.4 ;

2) .

9.5.3.

, , , 11-12% . . 80% 1000 220...380 .

1000 , , , - , .

, , : , , .

.

21

, , , , , , .. , , , -

, :

- , , ;

- ;

- .

. . . 22

22

,

,

1000

1000

R =< 10

R =< 0,5

. 23

23

, ,

0,1

0,1 - 0,5

0,5 - 1,0

5,0

20,0

100

9.6.

ʠ , :

1) , , 1 ;

2) ;

3) ;

4) ;

5) ;

-IIa. 40 . . -2, -5, -8.

, . 4 40 . . .

9.7.

1) . . 4 .

2) , ( ).

3) . 0.7 , 0.3 .

4) 0.3 500 . 500-700 . - 5-7 , 1.5 500 2.9 700 . 15. 15 . 0.6-0.7 ., 0.5 . 0.5 .

5) , , . 8:1 15:1. , . .

9.8.

12.0.005-84 " . " /., 1984/, , .

24

1. , , % MB-4M

-

-

-31 . . .

51

10 . . .

100 %

+0,1

+5%

2. , / , TAM-1 -

0,1 . . .

5 /

+2,1

/

3. , -

10 . . .

20000

25 . . .

140

+1
4. , . -116

0,38. . .

0,72

5 . . .

100000

+10 %
5. , /. -2 -

0,1 . . .

100 /

+20 %

. - Turbo-Pascal 6.0/7.0.

:

1) .

2) .

3) .

4) .

5) .

6) .

7) .

, , . , , . . . , . . , "/" . 45 .

Turbo-Pascal 7.0 IBM, EGA 640x350 , 16 .

.

1. .., .., . "". .: , 1990. 223 .

2. 77, .., .., .., .., .. // , 1995. N 3.

3. .., .., .., .. // , 1995. N4.

4. .. : 3 . .: - "- ", 1992..1: . 286 .

5. A.M., .. TURBO-PASCAL 7.O.M.: "-", 1995. 282 .

6. .. TURBO-PASCAL : N 1,2 / .., 1992. 33 .

7. .. TURBO-PASCAL : N 3,4,5 / .., 1992. 43 .

8. - : / .., .. / , 1990. 144 .

9. .. : / .., 1989. 34 .

10. .., .., .., .. - : / . ., 1993. 81 .

1

program GRAPHIC; { ""}

uses Crt, Graph, Dos, Strings, MYBOOK, RAZDEL1, RAZDEL2, RAZDEL3,

RAZDEL4 , RAZDEL5 , RAZDEL6 , RAZDEL7 ;

Type Dlina=string[6Q];

var Gd,Gm: integer;

Regime: byte;

NOMER3 , NOMER4 , NOMER5 , NOMER6 , NOMER7 : integer ;

Ball3 :array[l. .2} of integer; { } ball4 :array[l. .2] of integer; { }

ball5 :array[l. .2] of Integer;

ball6 :array[l. .2] of integer; ball7:array[l. .2] of integer; Itog :array[l, .2] of integer; {

}

tog:array[l. .2] of integer; {

}

:[1. .2] of integer; {

}

Dh: Char; { }

procedure Windol; { }

Type Ann=record

PPl:char;

2:array [0. .69] of char;

end;

var FF:file of Ann;

A: Ann;

St :string[68];

label 1;

begin

Assign (FF, 'VEDEN. pas' ); { }

{SI-}

Reset(FF);

{SI + }

IF lOResulto 0 then Writeln ('He VEDEN1);

ClearDevice;

OKNO; { }

For N:=0 to 31 do { }

begin

Read(FF,A);

St:=StrPas(A.PP2);

case A.PP1 of { }

: OutTextXY( 20 , 10*N+10 , St ) ;

0 : GoTo 1 ;

end;

end;

1:readkey;

Close(FF);

end;

procedure Cursor(Flag:boolean); { Flag=True, ;}

{ Flag=False,TO }

const sizeCursor:word=0;

var Red:registers;

begin

with Red do

begin

if Flag then

begin

CX:=SizeCursor; { }

end

else

begin

BH:=0; {0- }

:=03; { }

Intr($10,Red);

SizeCursor:=CX;{ }

:=$20; { }

end;

:=01; { }

Intr($10,Red);

end;

end;

procedure SVETFON(C,F:byte); { }

begin

TextColor(C);

TextBackground(F)

end;

procedure VERTIKALNOE_MENU(Kl,K2,Kp:byte;SS1,SS2,SS3,SS4,SS5,SS6,

SS7,SS8,SS9:dlina;Var Result:byte);

{ }

Label Met;

Const Kr=9;

Var M:array[l..Kr] of string[60];

I,T:byte;

Ch:char;

Fl:boolean;

begin

Cursor(False);

Fl:=True;

M[1]:=SS1;M[2]:=SS2;M[3]:=SS3;M[4]:=SS4;M[5]:=SS5;M[6]:=SS6;

M[7]:=SS7;M[8]:=SS8;M[9]:=SS9;

T:=Length(M[I]);

for I:=2 to Kp do

if Length(M{I])>T then T:=Length(M[I]);

for l:=l to Kp do

begin

if 1=1 then SVETFON(1,13)

else SVETFON(13,1);

GoToXY(Kl,K2+i);

write(M[I]);

end;

SVETFON(13,1);

I:=l;

while Fl=True do begin

Ch:=ReadKey;

if Ch=#13 then Fl:=False;

if(Ch=#0) and KeyPressed then

begin

Ch:=ReadKey;

case Ch of

#80: begin

GoToXY(Kl,K2+i);

SVETFON(13,1);

write(M[I]);

if i=(Kp+l) then

begin

I:=l;

SVETFON(3,l);

GoToXY(Kl,K2+l);

SVETFON(1, 13);

write(M[I]);

SVETFON(13,1);

goto Met;

end;

GoToXY(Kl,K2+I);

SVETFON(1,13);

write(M[I]);

SVETFON(13,1);

end;

#72: begin

if 1=1 then goto Met;

GoToXY(Kl,K2+I);

SVETFON(1371);

write(M[I]);

i:=I-1;

GoToXY(Kl,K2+I);

SVETFON(1,13);

write(M[I])

end

end;

Met:

end ;

end;

Result :=I;

SVETFON(13,1);

Cursor(True) ;

end;

begin { }

GraphRegim;

SetBKColor(l);

SetTextStyle(0,0,5);

SetColor(12);

OutTextXY(40,50, ' ');

SetTextStyle(0,0,1);

SetColor(15);

OutTextXY(100,225,'

);

OutTextXY(170,245,' . .');

OutTextXY(232,285,'');

OutTextXY{240,305,'2002);

readkey;

SetTextStyle(0,0,l);

Windo1;

CloseGraph;

NOMER3:=0; {, }

NOMER4:=0; {{ ) }

NOMER5:=0;

NOMER6:=0;

NOMER7:=0;

[1]:=0;

[2]:=0;

while True do begin

TextBackground(3);

ClrScr;

Cursor(False);

GoToXY(15,5);

TextColor(l);

write(' ?');

GoToXY(10,10);

VERTIKALNOE_MENU(10,10,9,

'

'

'

'

'

'

'

'

'

Regime);

case Regime of

1:RAZDEL10;

2:RAZDEL20;

3:begin

NOMER3:=NOMER3+1;

If NOMER3<3 then

begin

RAZDEL30;

ball3[NOMER3]:=REZ3;

Itog[nomer3]:=Itog[nomer3]+ball3[nomer3];

K[nomer3]:=K[nomer3]+l;

end

end;

4: begin

NOMER4:=NOMER4+1;

If NOMER4<3 then

begin

RAZDEL40;

ball4[nomer4]:=rez4;

Itog[nomer4]:=Itog[nomer4]+ball4[nomer4];

K[nomer4]:=K[nomer4]+l;

end

end;

5:begin

NOMER5:=NOMER5+1;

If NOMER5<3 then

begin

RAZDEL50;

115[5]:=rez5;

Itog[nomer5]:=Itog[nomer5]+ball5[nomer5];

K[nomer5]:=K[nomer5]+1;

end;

end;

6:begin

NOMER6:=NOMER6+1;

If NOMER6<3 then

begin

RAZDEL60;

ball6[nomer6]:=rez6; Itog[nomer6]:=Itog[nomer6]+ball6[nomer6]; K[nomer6]:=K[nomer6]+l;

end;

end

7:begin

NOMER7:=NOMER7+1;

IF NOMER7<3 then

begin

RAZDEL70;

ball7[nomer7]:=rez7;

Itog[nomer7]:=Itog[nomer7]+ball7[nomer7];

end;

end;

8:begin { }

If K[l]<>0 then

tog[l3:=Round(Itog[l]/K[1);

If K[2]<>0 then

tog[2]:=Round(Itog[2]/K[2]);

TextBackground(1);

ClrScr;

TextColor(12);

writeln;

Write('۠ ɠ ے);

writeln;

writeln('l ࠠ 2 ':80);

writeln;

wtiteln('

');

writeln;

writeln(' 1);

writeln;

writeln('

');

writeln;

writeln(' ');

writeln;

writeln(' ');

writeln;

writeln;

writeln(' ');

GotoXY(64,6); writeln(ball3[1]);

GoToXY(75,6); writeln(ball3[2]);

GoToXY(64,8); writeln(ball4[l]);

GoToXY(75,8); writeln(ball4[2]);

GoToXY(64,10); writeln(ball5[l]);

GoToXY(75,10); writeln(ball5[2]);

GoToXY(64,12); writeln(ball6[l]);

GoToXY(75,12); writeln(bal16[2]);

GoToXY(64,14); writeln(bal17[l]);

GoToXY(75,14); writeln(ball7[23)

GoToXY(64,18); writeln(tog[l]);

GoToXY(75,18); writeln(tog[2]);

readkey;

end;

9:begin

GraphRegim;

OKNO;

SetTextStyle{0,0,4);

SetColor(4);

OutTextXY(150,80,'B ');

OutTextXY(60,120,' ')

OutTextXY(100,160,' ?');

OutTextXY(230,280,'Y/N');

Dh:=ReadKey;

If (Dh='y') or (Dh='') then

begin

Cursor(True);

ClrScr;

Halt

end

else

CloseGraph;

end;

end;

end;

CloseGraph;

end.

{$A+, B-, D+, E+, F-, G-, I+,L+,N-,O-,P-,Q-,R-,S+,T-,V+,X+}

{$M 16384,0,655360}

Unit RAZDEL1;

interface

uses Crt, Graph, Dos, Strings, MYBOOK;

type An=record

P1:Char;

P2:array[0..69] of Char;

end;

var Fl:file of An ;

A: An;

Gd,Gm,Y,N:integer;

St:string[68];

procedure RAZDEL10; { " "}

implementation

procedure RAZDEL10;

Label 1;

begin

GraphRegim;

Assign(Fl,'RAZTEX1.pas');

{SI-}

Reset (Fl);

{SI+}

If lOResult <>0 then Writeln (' RAZTEX1.pas');

Repeat;

ClearDevice;

OKNO;

Y:=10;

For N:=0 to 31 do

begin

Read(Fl,A); St:=StrPas(A.P2);

case A.P1 of

' ':OutTextXY(20,Y*N+10,St);

'*':begin

SetColor{4);

OutTextXY(20,Y*N+10,St);

SetColor(l);

end;

'0':GoTo 1;

end;

end;

1: readkey;

until A.P1='O';

Close(Fl);

CloseGraph;

end;

begin

end.

{$A+,B-,D+,E+,F-,G-,I+,L+,N-,O-,P-,Q-,R-,S+,T-,V+,X+}

{$M 16384,0,655360}

Unit RAZDEL2;

interface

uses Crt,Graph,Dos,Strings,MYBOOK;

type An=record

P1:Char;

P2:array[0..69] of Char;

end;

var F2:file of An ;

A: An;

Gd,Gm,X,Y,N:integer;

St:string[68];

procedure RAZDEL20; { "

"}

implementation

procedure RAZDEL20;

Label 1;

begin

GraphRegim;

Assign(F2,'RAZTEX2.pas');

{SI-}

Reset(F2);

{SI+}

If IOResult <> 0 then Writeln (' RAZTEX2.pas');

repeat

ClearDevice;

OKNO;

Y:=10;

For N:=0 to 31 do

begin

Read(F2,A);

St:=StrPas(A.P2);

case A.P1 of

' ':OutTextXY(20,Y*N+10,St);

'*':begin

SetColor(4);

OutTextXY(20,Y*N+10,St);

SetColor(1);

end;

'0':GoTo 1;

end;

end;

1: readkey;

until A.P1='0';

Close(F2);

CloseGraph;

end;

begin

end.

Unit RAZDEL3;

interface

uses Crt,Graph,Dos,Strings,MYBOOK;

type An=record { }

P1:Char; { : , 𠠠

, , }

P2:array[0..69] of Char; { }

end;

type Ant=record { }

P1:Char; { : ,

, }

P2:array[0..1] of Char; { }

P3:array[0..69] of Char; { }

end;

type Antr=record { }

P1:Char; { : , ,

}

P2:array[0..1] of Char; { }

P3:array[0..0] of Char; { : ࠠ

, }

P4:array[0..69] of Char; { }

P5:array[0..2] of Char; { }

end;

var F3:file of An ; { }

A: An;

St:string[68];

Y,N:integer;

var F32:file of Ant; { }

At:Ant;

R1:string[2];

Z1:integer;

S:string[68];

var F33:file of Antr; { }

Atr:Antr;

R2:string[2];

R3:string[1];

Stt:string[68];

R4:string[2];

Z2,Z3,Z4:integer;

CH: Char; { }

K,J,I:integer; { }

M: array[0..3] of integer; {

}

Code:integer;

var R5:string[1]; { }

Z5:integer;

REZ3:Longint; { }

procedure RAZDEL30; { "堠

"}

implementation

const Mn:array[1..5] of PointType=((X:460;Y:30),(X:590;Y:90),

(X:590;Y:120),(X:430;Y:120),(X:460;Y:30));

Mno:array[1..5] of PointType=((X:460;Y:170),(X:590;Y:230),

(X:590;Y:260),(X:430;Y:260),(X:460;Y:170));

{ }

const Ww:array[1..5] of PointType=((X:390;Y:60),(X:510;Y:60),

(X:510;Y:260),(X:390;Y:260),(X:390;Y:60));

WWW:array[1..5] of PointType=((X:380;Y:50),(X:520;Y:50),

(X:520;Y:270),(X:380;Y:270),(X:380;Y:50));

{ }

procedure RAZDEL30;

Label 0,1,2,3;

begin

REZ3:=6;

GraphRegim;

Assign(F3,'RAZTEX3.pas'); { }

{SI-}

Reset(F3);

{SI+}

If IOResult <> 0 then Writeln (' RAZTEX3.pas');

repeat

OKNO;

Y:=10;

For N:=0 to 31 do { }

begin

Read(F3,A);

St:=StrPas(A.P2); { ASCIIZ- A.P2 󠠠

string}

case A.P1 of { }

' ': OutTextXY(20,Y*N+10,St);

'*': begin

SetColor(4);

OutTextXY(20,Y*N+10,St);

SetColor(1);

end;

'': begin

SetColor(4);

Line(460,120,593,120);

OutTextXY(460,160,'0');

OutTextXY(593,130,'(X,Y)');

SetColor(1);

end;

'2':begin

SetColor(4);

OutTextXY(460,160,'0 dX');

OutTextXY(600,180,'dY');

OutTextXY(550,200,'(dX,dY)');

Line(460,170,593,170);

Line(593,170,593,200);

Line(460,170,593,200);

SetColor(1);

end;

'3':begin

SetColor(4);

OutTextXY(430,245,'(X1,Y1)');

Line(460,260,593,285);

OutTextXY(580,270,'(X2,Y2)');

SetColor(1);

end;

'4':begin

SetBKColor(2);

SetColor(4);

Rectangle(460,40,590,90);

SetColor(1);

end;

'5':begin

SetFillStyle(1,4);

Bar(459,129,591,181);

SetFillStyle(8,5);

SetColor(4);

Bar(460,130,590,180);

SetColor(1);

end;

'6':begin

SetFillStyle(6,5);

SetColor(4);

Bar3D(460,240,590,300,20,true);

SetCOLOR(1);

SetFillStyle(1,15);

SetBKColor(11);

end;

'7':begin

SetBKColor(15);

SetColor(4);

DrawPoly(5,Mn);

SetColor(1);

end;

'8':begin

SetColor(4);

SetFillStyle(11,5);

SetBKColor(15);

FillPoly(5,Mno);

SetColor(1);

SetFillStyle(1,15);

end;

'0':GoTo 0;

end;

end;

0:readkey;

ClearDevice;

OKNO;

until A.P1='0';

Close(F3);

Assign(F32,'Joing.pas'); { }

{SI-}

Reset(F32);

{SI+}

If IOResult<>0 then Writeln(' Joing.pas');

Assign(F33,'Iod.pas'); { }

{SI-}

Reset(F33);

{SI+}

If IOResult<>0 then Writeln(' Iod.pas');

OKNO1; { " "}

readkey;

ClearDevice;

Randomize; { }

For J:=0 to 3 do

begin

1:I:=Random(10);

If I=0 then GOTO 1;

For K:=0 to J-1 do

begin

If M[k]=I then GOTO 1;

end;

M[J]:=I;

end;

repeat

OKNO;

begin

Read(F32,At);

R1:=StrPas(At.P2); { ASCIIZ- At.P2

string}

Val(R1,Z1,Code); {

}

Y:=20;

If(Z1=M[0]) or (Z1=M[1]) or (Z1=M[2]) or (Z1=M[3]) then

begin

repeat

S:=StrPas(At.P3); { ASCIIZ- At.P3

string}

OutTextXY(20,Y,S); { }

case At.P1 of { }

'1':begin

DrawPoly(5,Ww);

DrawPoly(5,Www);

Bar3D(410,100,470,120,20,true);

Bar3D(410,120,470,250,20,false)

end;

'2':begin

Bar3D(200,250,300,300,30,true);

Bar3D(200,300,300,320,30,true)

end;

'3':begin

Line(380,150,550,190);

Line(380,190,550,190);

Line(380,230,550,190);

OutTextXY(375,140,'(X,Y)');

OutTextXY(375,170,'dY');

OutTextXY(555,190,'(X1,Y1)');

OutTextXY(375,200,'dY');

end;

end;

Y:=Y+10;

Read(F32,At);

until At.P1='*';

2:OutTextXY(50,330,' ___');

CH:=ReadKey;

SetColor(4);

OutTextXY(320,325,CH);

SetColor(1);

readkey;

If(CH<>'1') and (CH<>'2') and (CH<>'3') and (CH<>'4') then

begin

SetFillStyle(1,11);

Bar(318,320,327,340);

GoTo 2;

end

else

repeat

Read(F33,Atr);

R2:=StrPas(Atr.P2); { ASCIIZ- Atr.P2 ⠠

string }

Val(R2,Z2,Code); {

}

If Z2=Z1 then

begin

repeat

If Atr.P3=CH then

begin

Y:=100;

OKNO;

repeat

Stt:=StrPas(Atr.P4); { ASCIIZ- Atr.P4

string }

R5:=StrPas(Atr.P5); { ASCIIZ- Atr.P5

string }

Val(R5,Z5,Code); {

}

REZ3:=Round((REZ3+Z5)/2); { }

OutTextXY(20,Y,Stt); { }

Y:=Y+10;

case Atr.P1 of { }

'1':begin

Line(380,150,550,190);

MoveRel(380,190);

Line(380,190,550,190);

LineTo(550,190);

OutTextXY(555,190,'(X1,Y1)');

OutTextXY(370,140,'(X,Y)');

OutTextXY(390,200,'(X,Y+dY)');

end;

'2':begin

GOTOXY(100,190);

LineTo(100,190);

LineRel(30,40);

LineRel(0,80);

end;

'3':begin

GOTOXY(100,190);

LineTo(380,150);

LineRel(30,40);

LineRel(0,80);

end;

end;

Read(F33,Atr);

until Atr.P3='*';

readkey;

GOTO 3;

end

else Read(F33,Atr);

until Atr.P1='*';

end

until Atr.P1='0';

end

else

3: end;

until At.P1='0';

Close(F32);

Close(F33);

CloseGraph;

end;

begin

end.

Unit RAZDEL4;

interface

uses Crt,Graph,Dos,Strings,MYBOOK;

type An = record {}

P1:Char; { : , 𠠠

}

P2:array[0..69] of char; { }

end;

type Ant=record { }

P1:Char; { : , -

, }

P2:array[0..1] of Char; { }

P3:array[0..69] of Char; { }

end;

type Antr=record { }

P1:Char; { : , ,

}

P2:array[0..1] of Char; { }

P3:array[0..0] of Char; { :

}

P4:array[0..69] of Char; { }

P5:array[0..2] of Char; { }

end;

var F4: file of An ; { }

A:An;

N,Y:integer;

St:string[68];

var F32:file of Ant; { }

At:Ant;

R1:string[2];

Z1:integer;

S:string[68];

var F33:file of Antr; { }

Atr:Antr;

R2:string[2];

R3:string[1];

Stt:string[68];

R4:string[2];

Z2,Z3,Z4:integer;

CH: Char;{ }

K,J,I:integer; { }

M: array[0..3] of integer; {

}

Code:integer;

var R5:string[1]; { }

Z5:integer;

REZ4:Longint; { }

procedure RAZDEL40;

implementation

procedure RAZDEL40;

Label 0,1,2,3;

begin

REZ4:=6;

GraphRegim;

Assign(F4,'RAZTEX4.pas'); { }

{SI-}

Reset(F4);

{SI+}

If IOResult <> 0 then Writeln (' RAZTEX4.pas');

repeat

ClearDevice;

OKNO;

Y:=10;

For N:=0 to 31 do { }

begin

Read(F4,A);

St:=StrPas(A.P2); { ASCIIZ- A.P2 󠠠

string}

OutTextXY(20,Y*N+10,St);

case A.P1 of

'*':begin

SetColor(4);

OutTextXY(20,Y*N+10,St);

SetColor(1);

end;

'1':begin SetFillStyle(1,15);

Bar(350,45,600,340);

SetFillStyle(1,0);

Bar(350,45,600,65);

SetFillStyle(1,1);

Bar(350,65,600,85);

SetFillStyle(1,2);

Bar(350,85,600,105);

SetFillStyle(1,3);

Bar(350,105,600,120);

SetFillStyle(1,4);

Bar(350,120,600,135);

SetFillStyle(1,5);

Bar(350,135,600,150);

SetFillStyle(1,6);

Bar(350,150,600,165);

SetFillStyle(1,7);

Bar(350,165,600,185);

SetFillStyle(1,8);

Bar(350,185,600,200);

SetFillStyle(1,9);

Bar(350,200,600,215);

SetFillStyle(1,10);

Bar(350,215,600,235);

SetFillStyle(1,11);

Bar(350,235,600,255);

SetFillStyle(1,12);

Bar(350,255,600,275);

SetFillStyle(1,13);

Bar(350,275,600,295);

SetFillStyle(1,14);

Bar(350,295,600,315);

SetFillStyle(1,15);

Bar(350,315,600,340);

end;

'2':begin

SetBKColor(15);

SetFillStyle(1,15);

Bar(200,100,600,300);

SetFillStyle(2,2);

Bar(200,100,600,120);

SetFillStyle(3,2);

Bar(200,120,600,145);

SetFillStyle(4,2);

Bar(200,145,600,168);

SetFillStyle(5,2);

Bar(200,168,600,190);

SetFillStyle(6,2);

Bar(200,190,600,210);

SetFillStyle(7,2);

Bar(200,210,600,228);

SetFillStyle(8,2);

Bar(200,228,600,246);

SetFillStyle(9,2);

Bar(200,246,600,264);

SetFillStyle(10,2);

Bar(200,264,600,282);

SetFillStyle(11,2);

Bar(200,282,600,300);

SetFillStyle(1,0);

end;

'0':GoTo 0

end;

end;

readkey;

0:until A.P1='0' ;

readkey;

Close(F4);

Assign(F32,'Joi.pas'); { }

{SI-}

Reset(F32);

{SI+}

If IOResult<>0 then Writeln(' Joi.pas');

Assign(F33,'Iodi.pas');

{SI-}

Reset(F33); { }

{SI+}

If IOResult<>0 then Writeln(' Iodi.pas');

OKNO1; {" "}

readkey;

ClearDevice;

Randomize; { }

For J:=0 to 3 do

begin

1:I:=Random(10);

If I=0 then GOTO 1;

For K:=0 to J-1 do

begin

If M[k]=I then GOTO 1;

end;

M[J]:=I;

end;

M[1]:=1;

repeat

OKNO;

begin

Read(F32,At);

R1:=StrPas(At.P2);{ ASCIIZ- At.P2 ⠠

string}

Val(R1,Z1,Code); {

}

Y:=20;

If(Z1=M[0]) or (Z1=M[1]) or (Z1=M[2]) or (Z1=M[3]) then

begin

repeat

S:=StrPas(At.P3); { ASCIIZ- At.P3 ⠠

string}

OutTextXY(20,Y,S); { }

case At.P1 of

' ':begin

end;

end;

Y:=Y+10;

Read(F32,At);

until At.P1='*';

OutTextXY(50,330,' ___');

2:CH:=ReadKey;

SetColor(4);

OutTextXY(320,325,CH);

SetColor(1);

readkey;

If(CH<>'1') and (CH<>'2') and (CH<>'3') and (CH<>'4') then

begin

SetFillStyle(1,11);

Bar(318,320,327,340);

GoTo 2;

end

else

repeat

Read(F33,Atr);

R2:=StrPas(Atr.P2); { ASCIIZ- Atr.P2 ⠠

string}

Val(R2,Z2,Code); {

}

If Z2=Z1 then

begin

repeat

If Atr.P3=CH then

begin

Y:=100;

OKNO;

repeat

Stt:=StrPas(Atr.P4); { ASCIIZ- Atr.P4

string}

R5:=StrPas(Atr.P5); { ASCIIZ- Atr.P5 ⠠

string}

Val(R5,Z5,Code); {

}

REZ4:=Round((REZ4+Z5)/2); { }

OutTextXY(20,Y,Stt);

Y:=Y+10;

case Atr.P1 of

' ':begin

end;

end;

Read(F33,Atr);

until Atr.P3='*';

readkey;

GOTO 3;

end

else Read(F33,Atr);

until Atr.P1='*';

end

until Atr.P1='0';

end

else

3:end;

until At.P1='0';

Close(F32);

Close(F33);

CloseGraph;

end;

begin

end.

Unit RAZDEL5;

interface

uses Crt,Graph,Dos,Strings,MYBOOK;

type An = record

P1:Char;

P2:array[0..69] of char;

end;

type Ant=record { }

P1:Char;

P2:array[0..1] of Char;

P3:array[0..69] of Char;

end;

type Antr=record { }

P1:Char;

P2:array[0..1] of Char;

P3:array[0..0] of Char;

P4:array[0..69] of Char;

P5:array[0..2] of Char;

end;

var F5: file of An ;

A:An;

N,Y:integer;

St:string[68];

var F52:file of Ant; { }

At:Ant;

R1:string[2];

Z1:integer;

S:string[68];

V:char;

var F53:file of Antr; { }

Atr:Antr;

R2:string[2]; { Ant.P1- }

R3:string[1]; { Ant.P2- }

Stt:string[68];{ Ant.P3- }

R4:string[2]; { Ant.P4- }

Z2,Z3,Z4:integer;

CH: Char; { }

K,J,I:integer;

M: array[0..3] of integer;

Nom:Longint;

Code:integer;

var R5:string[1]; { }

Z5:integer;

REZ5:Longint;

procedure RAZDEL50;

implementation

procedure RAZDEL50;

Label 0,1,2,3;

begin

REZ5:=0;

GraphRegim;

Assign(F5,'RAZTEX5.pas');

{SI-}

Reset(F5);

{SI+}

If IOResult <> 0 then Writeln (' RAZTEX5.pas');

repeat

ClearDevice;

OKNO;

Y:=10;

For N:=0 to 31 do

begin

Read(F5,A);

St:=StrPas(A.P2);

case A.P1 of

' ':OutTextXY(20,Y*N+10,St);

'*':begin

SetColor(4);

OutTextXY(20,Y*N+10,St);

SetColor(1);

end;

'1':begin

SetColor(4);

Arc(500,150,0,278,30);

OutTextXY(490,140,'(X,Y)');

OutTextXY(500,150,'.');

SetColor(1);

end;

'2':begin

SetColor(4);

Circle(500,300,30);

OutTextXY(475,290,'(X,Y)');

OutTextXY(500,300,'.');

SetColor(1);

end;

'3':begin

SetBKColor(15);

SetColor(4);

Ellipse(500,100,0,278,50,25);

OutTextXY(490,90,'(X,Y)');

OutTextXY(500,100,'.');

SetColor(1);

end;

'4': begin

SetColor(2);

Ellipse(500,180,10,270,50,30);

Line(500,135,460,225);

SetFillStyle(4,14);

FloodFill(455,180,2);

end;

'5': begin

SetColor(4);

Ellipse(500,300,0,361,50,30);

FillEllipse(500,300,50,30);

SetFillStyle(1,15);

SetColor(1);

end;

'6': begin

SetFillStyle(7,13);

PieSlice(500,120,0,120,50);

end;

'7': begin

SetFillStyle(9,13);

Sector(500,200,0,270,50,30);

SetFillStyle(1,15);

end;

'8':begin

SetFillStyle(1,9);

Bar(250,100,600,200);

SetViewPort(250,100,600,200,true);

FloodFill(260,110, 1);

Randomize;

repeat

PutPixel(Random(GetMaxX),Random(GetMaxY),15);

Delay(15);

until KeyPressed;

SetFillStyle(1,15);

SetViewPort(5,5,635,345,true);

end;

'9': begin

Diogramma;

end;

'0':GoTo 0

end;

end;

0:readkey;

until A.P1='0';

Close(F5);

Assign(F52,'Join.pas'); { }

{SI-}

Reset(F52);

{SI+}

If IOResult<>0 then Writeln(' Join.pas');

Assign(F53,'Iodin.pas');

{SI-}

Reset(F53); { }

{SI+}

If IOResult<>0 then Writeln(' Iodin.pas');

OKNO1; {" "}

readkey;

ClearDevice;

Randomize; { }

For J:=0 to 3 do

begin

1:I:=Random(6);

If I=0 then GOTO 1;

For K:=0 to J-1 do

begin

If M[k]=I then GOTO 1;

end;

M[J]:=I;

end;

repeat

OKNO;

begin

Read(F52,At); { }

R1:=StrPas(At.P2);

Val(R1,Z1,Code);

Y:=20;

If(Z1=M[0]) or (Z1=M[1]) or (Z1=M[2]) or (Z1=M[3]) then

begin

repeat

S:=StrPas(At.P3);

OutTextXY(20,Y,S);

case At.P1 of

'2':begin

end

end;

Y:=Y+10;

Read(F52,At);

until At.P1='*';

OutTextXY(50,330,' ___');

2:CH:=ReadKey;

SetColor(4);

OutTextXY(320,325,CH);

SetColor(1);

readkey;

If(CH<>'1') and (CH<>'2') and (CH<>'3') and (CH<>'4') then

begin

SetFillStyle(1,11);

Bar(318,320,327,340);

GoTo 2;

end

else

repeat

Read(F53,Atr);

R2:=StrPas(Atr.P2);

Val(R2,Z2,Code);

If Z2=Z1 then

begin

repeat

If Atr.P3=CH then

begin

Y:=100;

OKNO;

repeat

Stt:=StrPas(Atr.P4);

R5:=StrPas(Atr.P5); { }

Val(R5,Z5,Code);

REZ5:=Round((REZ5+Z5)/2);

OutTextXY(20,Y,Stt);

Y:=Y+10;

case Atr.P1 of

'1':begin

end;

'0':GoTo 3;

end;

Read(F53,Atr);

until Atr.P3='*';

readkey;

GOTO 3;

end

else Read(F53,Atr);

until Atr.P1='*';

end

until Atr.P1='0';

end

else

3: end;

until At.P1='0';

Close(F52);

Close(F53);

CloseGraph;

end;

begin

end.

Unit RAZDEL6;

interface

uses Crt,Graph,Dos,Strings,MYBOOK;

type An = record {}

P1:Char; { : , 𠠠

}

P2:array[0..69] of char; { }

end;

type Ant=record { }

P1:Char; { : , -

, }

P2:array[0..1] of Char; { }

P3:array[0..69] of Char; { }

end;

type Antr=record { }

P1:Char; { : , ,

}

P2:array[0..1] of Char; { }

P3:array[0..0] of Char; { :

}

P4:array[0..69] of Char; { }

P5:array[0..2] of Char; { }

end;

var F6: file of An ; { }

A:An;

Y,N,T1,T2,T3,T4:integer;

St:string[68];

var F62:file of Ant; { }

At:Ant;

R1:string[2];

Z1:integer;

S:string[68];

var F63:file of Antr; { }

Atr:Antr;

R2:string[2];

R3:string[1];

Stt:string[68];

R4:string[2];

Z2,Z3,Z4:integer;

CH: Char;{ }

K,J,I:integer; { }

M: array[0..3] of integer; {

}

Code:integer;

var R5:string[1]; { }

Z5:integer;

REZ6:Longint; { }

procedure RAZDEL60; { "堠

}

implementation

procedure RAZDEL60;

Label 0,1,2,3;

begin

REZ6:=6;

GraphRegim;

Assign(F6,'RAZTEX6.pas');

{SI-}

Reset(F6);

{SI+}

If IOResult <> 0 then Writeln (' RAZTEX6.pas');

repeat

ClearDevice;

OKNO;

For N:=0 to 31 do

begin

Read(F6,A);

St:=StrPas(A.P2); { ASCIIZ- A.P2

string}

case A.P1 of

' ':OutTextXY(20,10*N+10,St);

'*':begin

SetColor(4);

OutTextXY(20,10*N+10,St);

SetColor(1);

end;

'1':begin

SetFillStyle(1,1);

Bar(10,30,630,338);

SetColor(15);

SetTextStyle(2,0,1);

OuttextXY(50,50,'TriplexFont, HorizDir, 15');

SetTextStyle(1,0,3);

SetColor(12);

OutTextXY(50,100,'DefaultFont, HorizDir, 12') ;

SetTextStyle(3,0,4);

SetColor(13);

OutTextXY(50,160, 'SmallFont, HorizDir, 13');

SetTextStyle(4,0,5);

SetColor(10);

OutTextXY(50,220,'SanSerifFont, HorizDir, 10');

SetTextStyle(0,0,3);

SetColor(14);

OutTextXY(50,300,'GothicFont, HorizDir, 14');

SetTextStyle(0,1,2);

SetColor(14);

OutTextXY(30,30,'DefaultFont,VertDir');

SetTextStyle(0,0,1);

SetColor(1);

end;

'2':begin

SetColor(4);

SetTextStyle(1,0,1);

SetUserCharSize(1,1,1,1);

OutTextXY(20,120,'Turbo-Pascal 7.0');

SetUserCharSize(3,2,3,2);

OutTextXY(20,160,'Turbo-Pascal 7.0');

SetUserCharSize(2,1,2,1);

OutTextXY(20,230,'Turbo-Pascal 7.0');

SetTextStyle(0,0,1);

SetColor(1);

end;

'3':begin

T1:=InstallUserFont('Goth');

T2:=InstallUserFont('sans');

T3:=InstallUserFont('trip');

T4:=InstallUserFont('bold');

If GraphResult<grOK then

begin

OutTextXY(40,180,' ');

readkey;

end;

SetFillStyle(1,1);

Bar(10,30,630,335);

SetTextStyle(T1,0,4);

SetColor(13);

OutTextXY(100,60,'Goth.chr, HorizDir') ;

SetTextStyle(T2,0,4);

SetColor(10);

OuttextXY(100,110,'Sanse, HorizDir');

SetTextStyle(T3,0,4);

SetColor(4);

OutTextXY(100,170, 'Trip, HorizDir');

SetTextStyle(T4,0,4);

SetColor(14);

OutTextXY(100,230,'Bold, HorizDir');

SetTextStyle(0,1,2);

SetColor(15);

OutTextXY(45,35,'Goth.chr, VertDir');

SetTextStyle(0,0,1);

SetColor(1);

end;

'#':GoTo 0;

'0':GoTo 0

end;

end;

0:readkey;

until A.P1='0';

Close(F6);

Assign(F62,'Jois.pas'); { }

{SI-}

Reset(F62);

{SI+}

If IOResult<>0 then OutTextXY(50,100,' Jois.pas');

Assign(F63,'Iodis.pas');

{SI-}

Reset(F63); { }

{SI+}

If IOResult<>0 then Writeln(' Iodis.pas');

OKNO1; {" "}

readkey;

ClearDevice;

Randomize; { }

For J:=0 to 3 do

begin

1:I:=Random(10);

If I=0 then GOTO 1;

For K:=0 to J-1 do

begin

If M[k]=I then GOTO 1;

end;

M[J]:=I;

end;

M[1]:=1;

repeat

OKNO;

begin

Read(F62,At);

R1:=StrPas(At.P2);{ ASCIIZ- At.P2 ⠠

string}

Val(R1,Z1,Code); {

}

Y:=20;

If(Z1=M[0]) or (Z1=M[1]) or (Z1=M[2]) or (Z1=M[3]) then

begin

repeat

S:=StrPas(At.P3); { ASCIIZ- At.P3 ⠠

string}

OutTextXY(20,Y,S); { }

case At.P1 of

' ':begin

end;

end;

Y:=Y+10;

Read(F62,At);

until At.P1='*';

OutTextXY(50,330,' ___');

2:CH:=ReadKey;

SetColor(4);

OutTextXY(320,325,CH);

SetColor(1);

readkey;

If(CH<>'1') and (CH<>'2') and (CH<>'3') and (CH<>'4') then

begin

SetFillStyle(1,11);

Bar(318,320,327,340);

GoTo 2;

end

else

repeat

Read(F63,Atr);

R2:=StrPas(Atr.P2); { ASCIIZ- Atr.P2 ⠠

string}

Val(R2,Z2,Code); {

}

If Z2=Z1 then

begin

repeat

If Atr.P3=CH then

begin

Y:=100;

OKNO;

repeat

Stt:=StrPas(Atr.P4); { ASCIIZ- Atr.P4

string}

R5:=StrPas(Atr.P5); { ASCIIZ- Atr.P5

string}

Val(R5,Z5,Code); {

}

REZ6:=Round((REZ6+Z5)/2); { }

OutTextXY(20,Y,Stt);

Y:=Y+10;

case Atr.P1 of

' ':begin

end;

end;

Read(F63,Atr);

until Atr.P3='*';

readkey;

GOTO 3;

end

else Read(F63,Atr);

until Atr.P1='*';

end

until Atr.P1='0';

end

else

3:end;

until At.P1='0';

Close(F62);

Close(F63);

CloseGraph;

end;

begin

end.

Unit RAZDEL7;

interface

uses Crt,Graph,Dos,Strings,MYBOOK;

type An = record {}

P1:Char; { : , 𠠠

}

P2:array[0..69] of char; { }

end;

type Ant=record { }

P1:Char; { : , -

, }

P2:array[0..1] of Char; { }

P3:array[0..69] of Char; { }

end;

type Antr=record { }

P1:Char; { : , ,

}

P2:array[0..1] of Char; { }

P3:array[0..0] of Char; { :

}

P4:array[0..69] of Char; { }

P5:array[0..2] of Char; { }

end;

var F7: file of An ; { }

A:An;

N,Y,T:integer;

St:string[68];

var F72:file of Ant; { }

At:Ant;

R1:string[2];

Z1:integer;

S:string[68];

var F73:file of Antr; { }

Atr:Antr;

R2:string[2];

R3:string[1];

Stt:string[68];

R4:string[2];

Z2,Z3,Z4:integer;

CH: Char;{ }

K,J,I:integer; { }

M: array[0..3] of integer; {

}

Code:integer;

var R5:string[1]; { }

Z5:integer;

REZ7:Longint; { }

var Size:word;

pt:pointer;

u,Nn,xt,yt:integer;

procedure RAZDEL70;

implementation

procedure RAZDEL70;

Label 0,1,2,3;

begin

REZ7:=6;

GraphRegim;

Assign(F7,'RAZTEX7.pas'); { }

{SI-}

Reset(F7);

{SI+}

If IOResult <> 0 then Writeln (' RAZTEX7.pas');

repeat

OKNO;

For N:=0 to 32 do

begin

Read(F7,A);

St:=StrPas(A.P2); { ASCIIZ- A.P2

string}

case A.P1 of

' ':OutTextXY(20,10*N+10,St);

'*':begin

SetColor(4);

OutTextXY(20,10*N+10,St);

SetColor(1);

end;

'1':begin

For Nn:=0 to 3 do

begin

GetMem(pt,ImageSize(0,200,50,250));

GetImage(0,200,50,250,pt^);

u:=0;

while u<(GetMaxX) do

begin

PutImage(u-1,150,pt^,1);

u:=u+8;

PutImage(u-1,150,pt^,1);

end;

Dispose(pt);

end;

end;

'2':begin

SetViewPort(10,50,630,330,true);

SetBKColor(0);

SetViewPort(20,60,620,320,true);

ClearViewPort;

SetBKColor(14); Sound(880); Delay(200); NoSound;

SetBKColor(12); Sound(698); Delay(200); NoSound;

SetBKColor(14); Sound(880); Delay(200); NoSound;

SetBKColor(12); Sound(698); Delay(200); NoSound;

SetBKColor(10); Sound(934); Delay(200); NoSound;

SetBKColor(14); Sound(880); Delay(200); NoSound;

SetBKColor(13); Sound(784); Delay(400); NoSound;

SetBKColor(1); Sound(523); Delay(200); NoSound;

SetBKColor(9); Sound(523); Delay(200); NoSound;

SetBKColor(1); Sound(523); Delay(200); NoSound;

SetBKColor(2); Sound(587); Delay(100); NoSound;

SetBKColor(5); Sound(659); Delay(100); NoSound;

SetBKColor(4); Sound(699); Delay(200); NoSound;

SetBKColor(3); Sound(699); Delay(200); NoSound;

SetBKColor(4); Sound(699); Delay(200); NoSound;

Delay(600);

SetViewPort(5,5,635,335,true);

SetBKColor(14);

ClearDevice;

OKNO;

End;

'#':GoTo 0;

'0':GoTo 0;

end;

end;

0:readkey;

until A.P1='0' ;

Close(F7);

Assign(F72,'Jos.pas'); { }

{SI-}

Reset(F72);

{SI+}

If IOResult<>0 then Writeln(' Jos.pas');

Assign(F73,'Ios.pas');

{SI-}

Reset(F73); { }

{SI+}

If IOResult<>0 then Writeln(' Ios.pas');

OKNO1; {" "}

readkey;

ClearDevice;

Randomize; { }

For J:=0 to 3 do

begin

1:I:=Random(7);

If I=0 then GOTO 1;

For K:=0 to J-1 do

begin

If M[k]=I then GOTO 1;

end;

M[J]:=I;

end;

repeat

OKNO;

begin

Read(F72,At);

R1:=StrPas(At.P2);{ ASCIIZ- At.P2 ⠠

string}

Val(R1,Z1,Code); {

}

Y:=20;

If(Z1=M[0]) or (Z1=M[1]) or (Z1=M[2]) or (Z1=M[3]) then

begin

repeat

S:=StrPas(At.P3); { ASCIIZ- At.P3 ⠠

string}

OutTextXY(20,Y,S); { }

case At.P1 of

' ':begin

end;

end;

Y:=Y+10;

Read(F72,At);

until At.P1='*';

OutTextXY(50,320,' ___');

2:CH:=ReadKey;

SetColor(4);

OutTextXY(320,310,CH);

SetColor(1);

readkey;

If(CH<>'1') and (CH<>'2') and (CH<>'3') and (CH<>'4') then

begin

SetFillStyle(1,11);

Bar(318,290,327,320);

GoTo 2;

end

else

repeat

Read(F73,Atr);

R2:=StrPas(Atr.P2); { ASCIIZ- Atr.P2 ⠠

string}

Val(R2,Z2,Code); {

}

If Z2=Z1 then

begin

repeat

If Atr.P3=CH then

begin

Y:=100;

OKNO;

repeat

Stt:=StrPas(Atr.P4); { ASCIIZ- Atr.P4

string}

R5:=StrPas(Atr.P5); { ASCIIZ- Atr.P5 ⠠

string}

Val(R5,Z5,Code); {

}

REZ7:=Round((REZ7+Z5)/2); { }

OutTextXY(20,Y,Stt);

Y:=Y+10;

case Atr.P1 of

' ':begin

end;

end;

Read(F73,Atr);

until Atr.P3='*';

readkey;

GOTO 3;

end

else Read(F73,Atr);

until Atr.P1='*';

end

until Atr.P1='0';

end

else

3:end;

until At.P1='0';

Close(F72);

Close(F73);

CloseGraph;

end;

begin

end.

unit MYBOOK;

interface

uses Graph,Crt,Strings,Dos;

Type Dlina=string[10];

var Ch:char;

Regime:byte;

c,Gd,Gm,i,x1,x2,y1,y2:integer;

ArcCoords:ArcCoordsType;

StAngle,dAngle,KRadius:word;

const OK:array[1..11] of PointType= ((X:0;Y:0),(X:640;Y:0),

(X:640;Y:350), (X:0;Y:350),(X:0;Y:8),(X:5;Y:8),

(X:5;Y:345),(X:635;Y:345),(X:635;Y:5),(X:0;Y:5),

(X:0;Y:0));

procedure Diogramma;

procedure OKNO;

procedure OKNO1;

procedure GraphRegim;

implementation

procedure OKNO;

begin

SetColor(14);

DrawPoly(11,OK);

SetFillStyle(1,14);

FloodFill(635,2,14);

SetFillStyle(1,11);

Bar(6,6,634,344);

SetColor(1);

end;

procedure OKNO1;

const OK:array[1..11] of PointType= ((X:0;Y:0),(X:640;Y:0),

(X:640;Y:350), (X:0;Y:350),(X:0;Y:8),(X:5;Y:8),

(X:5;Y:345), (X:635;Y:345),(X:635;Y:5),(X:0;Y:5),

(X:0;Y:0));

begin

SetColor(14);

DrawPoly(11,OK);

SetFillStyle(1,14);

FloodFill(635,2,14);

SetFillStyle(1,11);

Bar(6,6,634,344);

SetColor(4);

SetTextStyle(0,0,6);

OutTextXY(50,100,'');

OutTextXY(140,150,'');

SetTextStyle(0,0,1);

SetColor(1);

end;

procedure Diogramma;

begin

SetViewPort(0,0,GetMaxX,GetMaxY,true);

SetColor(11);

SetLineStyle(0,0,3);

SetFillStyle(1,13);

PieSlice(170,210,0,359,120);

SetFillStyle(9,2);

PieSlice(170,210,0,30,120);

SetFillStyle(1,3);

Sector(170,210,0,359,80,120);

SetFillStyle(11,5);

Sector(170,210,0,270,80,120);

SetFillStyle(1,15);

Circle(480,210,120);

FloodFill(480,210,11);

StAngle:=0;

dAngle:=360 Div 16;

while(StAngle+dAngle)<360 do

begin

c:=random(14);

SetColor(c);

Arc(535,210,StAngle,StAngle+dAngle,40);

GetArcCoords(ArcCoords);

with ArcCoords do

begin

KRadius:=Round(SQRT(SQR(Xend-600)+SQR(Yend-210)));

Circle(Xend,Yend,KRadius);

setfillstyle(1,c);

floodfill(xend-kradius+5,yend,c);

end;

StAngle:=StAngle+dAngle;

end;

end;

procedure GraphRegim;

var Gd,Gm:integer;

begin

Gd:=Detect;

InitGraph(Gd,Gm,'');

If GraphResult<>grOK then Halt(1);

end;

begin

end.

2

TURBO-PASCAL 7.0, ,

IBM PC.

TURBO-PASCAL7.0 -

堠 ࠠ :

Grt Graph.

Grt :

1. .

2. .

3. .

4. .

5. .

蠠 蠠 Graph :

1. .

2. , , .

3. .

4. .

5. .

6. .

7. .

:

1. .

2. .

3.

4. .

5.

6. .

7. .

,

蠠 堠 .

0

,

TURBO-PASCAL

:

---------- program <> - .

I uses Graph - .

I { }.

I ------ InitGraph -

I I { " ".

I I SetGraphMode - .

I I { }.

I I I-- RestoreCrtMode - .

I I I { }.

I I I-> SetGraphMode - .

I I { }.

I I-----> CloseGraph

I { }.

I--------> end. - .

* proedure InitGraph(var GraphDriver:integer;

* var GraphMode:integer;

* DriverPath:string);

,

, , ,

...

GraphDriver - ,

,

.

GraphMode - ,

.

DriverPath - , (

, ,

).

:

-2 - ;

-3 - ;

-4 - ;

-5 - ;

-10 - .

* procedure CloseGraph( );

,

, ,

.

* procedure SetGraphMode(Mode:integer);

Mode - . -

. -

.

* procedure RestoreCrtMode( );

.

:

* function GetDriverName:string; -

.

* function GetModeName(ModeNumber:integer):string -

.

* function GetMaxMode:integer -

.

* procedure GetModeRange(GraphDriver:integer;

* var LowMode,HighMode:integer); -

-

. LowMode

HighMode

, .

* function GetGraphMode:integer; -

.

* procedure GetAspectRatio(var Xasp, Yasp:word); -

X Y ,.

0

-

c-

. , . -

InitGraph

,

() .

TURBO-PASCAL MoveTo,MoveRel,

GetX,GetY.

* procedure MoveTo(x,y:integer);

x,y -

.

* procedure MoveRel(Dx,Dy:integer);

-

. Dx, Dy - x y.

* function GetX: word;

X.

* function GetY: word;

Y.

GetMaxX GetMaxY,

,

, .

* procedure ClearDevice;

-

.

* procedure SetViewPort(X1,Y1,X2,Y2:word;Clip:boolean);

. -

:(X1,Y1) (X2,Y2)

, Clip

true

false, .

* procedure ClearViewPort;

,

, .

* procedure GetViewSettings(var ViewPortType);

ViewPort. ViewPortType Graph.

0

-, .

* procedure LineTo(X,Y:integer);

(X,Y).

* procedure LineRel(Dx,Dy:integer);

2

,

-

Dx Dy OX OY .

* procedure Line(X1,Y1,X2,Y2:integer);

3

(X1,Y1)

(X2,Y2).

.

* procedure Rectangle(X1,Y1,X2,Y2:integer);

4

(X1,Y1)

(X2,Y2) .

* procedure Bar(X1,Y1,X2,Y2:integer);

5

,

. (X1,Y1), (X2,Y2) -

.

* procedure Bar3D(X1,Y1,X2,Y2:integer;

* Depth:word;Top:boolean)

6

.

(X1,Y1),(X2,Y2) -

.

Depth - (

.

Top - .

* procedure DrawPoly(NumPoints:word;

* var PolyPoints);

7 .

NumPoints -

PolyPoints - ,

NumPoints+1

( ).

* procedure FillPoly(NumPoints:word;var PolyPoints);

8

. NumPoints PolyPoints

,

DrawPoly.

0

01

, ?

1 LineTo(X,Y);

Line(X1,Y1,X2,Y2);

2 Line(X1,Y1,X2,Y2);

DrawPoly(NumPoint,PolyPoints);

3 LineTo(X,Y);

Line(X1,Y1,X2,Y2);

DrawPoly(NumPoint,Poly Points);

4 Line(X1,Y1,X2,Y2);

*

02 ?

1

1 Bar3D(X1,Y1,X2,Y2,Depth,true);

SetViewPort(X1,Y1,X2,Y2,false);

ClearViewPort;

Bar3D(X1,Y2,X2,Y3,Depth,false);

2 Bar3D(X1,Y1,X2,Y2,Depth,true);

SetViewPort(X1,Y1,X2,Y2,Depth,true);

ClearViewPort;

Bar3D(X1,Y1,X2,Y3,Depth,false);

3 Bar3D(X1,Y1,X2,Y2,Depth,true);

Bar3D(X1,Y2,X2,Y3,Depth,false);

4 Bar3D(X1,Y1,X2,Y2,Depth,true);

Bar3D(X1,Y2,X2,Y3,Depth,true);

*

03 -

?

1 Bar(X1,Y1,X2,Y2);

SetViewPort(X1,Y1,X2,Y2,true);

ClearViewPort;

2 Bar(X1,Y1,X2,Y2);

3 Bar3D(X1,Y1,X2,Y2,Depth,true);

4 Bar3D(X1,Y1,X2,Y2,false);

*

04

2 ?

1 Bar3D . -

"" -

.

2 Top=false Bar3D

.

3 Top=false Bar3D

.

4

DrawPole -

FillPole.

*

05 , ?

1 DrawPole(10,zve), zve -

PointType,

10 .

2 DrawPole(10,zvez) , zvez

11 .

3 FillPole(10,zves), zves -

11 .

4

FillPole(10,zves) , .

*

06

?

1 GetDriverName;

2 GetModeName(ModeNumber);

3 GetMaxMode;

4 GetModeRange(GraphDriver;LowMode,HighMode);

*

07 .

1

2 , GetX, GetY.

3 , GetMaxX, GetMaxY.

4 , MoveRel.

*

08

3 ? (X1,Y1).

1 Line(X,Y,X1,Y1);

MoveRel(X,Y+dY);

Line(X,Y+dY,X1,Y1);

MoveRel(0,dY);

LineTo(X1,Y1);

2 LineTo(X1,Y1);

LineRel(0,dY);

LineRel(0,2dY);

3 LineTo(X,Y);

MoveRel(0,dY);

Line(X,Y+dY,X1,Y1);

MoveRel(0,dY);

Line(X,Y+2dY,X1,Y1);

4 LineTo(X,Y);

LineRel(0,dY);

LineRel(0,2dY);

*

09

InitGraph?

1

.

2 -

.

3 -

.

4 -

.

*

10 IBM?

1 50-60 /

2 20-40 /

3 100-120 /

4 200 /

*

0

011 LineTo(X,Y) , ࠠ 002

.

*

2 . , DrawPoly 젠 004

.

*

3 LineTo(X,Y) , 002

. DrowPoly

.

*

4 . 005

*

*

021 . -002

. .

Bar3D -

.

*

2 SetViewPort. 002

-

Bar3D .

*

3 . 005

*

4 . -003

.

*

*

031 . SetViewPort ClearViewPort - 003

,.. Bar ,

,

*

2 頠 005

*

3 Bar3D ,002

.

*

4 Bar3D ,002

.

*

*

041 . Bar3D - 002

. -

, .. -

.

*

2 . 005

*

3 . Top Bar3D 002

( ) .

*

4 . Top=False 002

Bar3D. .

*

*

051 . DrawPoly 002

. .

*

2 . 002

, .

*

3 . 005

*

4 . , 蠠 004

.

*

*

061 . 005

*

2 . GetModeName 堠 002

.

*

3 . GetMaxMode 𠠠 002

.

*

4 . GetModeRange 堠 002

.

*

*

071 . . 002

*

2 . 005

*

3 . 堠 002

.

*

4 . MoveRel  002

.

*

*

1081 . : 002

*

2 2 . : 002

*

3 . 005

*

3 4 . : 002

*

*

091 . 002

*

2 . 002

*

3 . 005

*

4 . 002

*

*

101 . 005

*

2 . 002

*

3 . 002

*

4 . 002

*

*

0

.

* procedure GetPalette(var PaletteType);

. -

EGA, EGA 64

VGA.

* procedure SetAllPalette(var Palette);

.

Palette N-

N - . -

-1, .

* procedure SetPalette(NumberColor:word;Color:byte);

. NumberColor -

. Color - .

* procedure SetColor(Color:word);

.Color -

.

_____________________________________________________________________

--------------------------------------------------------------------

Black 0

Blue 1

Green 2

Cyan 3

Red 4

Magenta 5

Brown 6

LightGray 7 -

DarkGray 8 -

LightBlue 9 -

LightGreen 10 -

LightCyan 11 -

LightRed 12

LightMagenta 13 -

Yellow 14

1White 15

* procedure SetBKColor(Color:word);

. Color - .

,

, :

function GetColor:word;

function GetBKColor:word;

, ,

,

.

* procedure SetLineStyle(LineStyle:word; Pattern:word;

* Thiekness:word);

.

LineStyle :

SolidLn = 0 ___________________________________________________

DottedLn = 1 ...................................................

CenterLn = 2 ._._._._._._._._._._._._._._._._._._._._._._._._._ .

DashedLn = 3 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

UserBitLn = 4 , .

LineStyle=userBitLn, Pattern -

- , 1, -

, 0 .

Thickness -

: NormWidth = 1 -

ThickWidth= 3 -

* procedure GetLineSettings(var LineInfo:LineSettingsType);

.

LineSettingsType Graph , :

LineStyle:word;

Pattern:word;

Thickness:word;, ,

SetLineStyle.

* procedure SetFillStyle[(Pattern:word;Color:word)];

. " -

" . Color - .

Pattern

.

* procedure SetFillPattern(Pattern:FillPatternType;Color:word);

.

Pattern - .

typeFillPatternType=array[1..8] of byte;

Color - .

* procedure GetFillSettings(varFillInfo:FillSettingsType)

-

Color Pattern .

--------------------------------------------------------------------

--------------------------------------------------------------------

EmptyFill 0

SolidFill 1

LineFill 2

LtSlashFill 3

SlashFill 4

BkSlashFill 5

LtBkSlashFill 6

HatchFill 7

XHatchFill 8

InterLeaveFill 9

WideDotFill 10

CloseDotFill 11

2 UserFill 12

0--------------------------------------------------------------------

01

?

1 GetPalette(Palette);

1 2 SetPalette(NumberColor,Color);

3 SetAllPalette(Palette);

4 SetLineStyle(LineStyle,Pattern,Thickness);

*

02

(3).

1 SetFillStyle(0,3);

Bar(X1,Y1,X1+d,Y1+d);

2 SetBKColor(0);

SetColor(3);

Bar(X1,Y1,X1+d,Y1+d);

3 SetBKColor(0);

SetFillStyle(0,3);

Bar(X1,Y1,X1+d,Y1+d);

4 SetFillStyle(0,3);

SetBKColor(0);

Bar(X1,Y1,X1+d,Y1+d);

*

03

(4) (9) (1)?

1 SetBKColor(4);

SetFillStyle(9,1,0);

Bar(X1,Y1,X2,Y2);

2 SetBKColor(4);

Rectangle(X1,Y1,X2,Y2);

SetFillStyle(9,1,0);

3 SetBKColor(4);

SetFillStyle(9,1);

Bar(X1,Y1,X2,Y2);

4 SetBKColor(4);

Bar(X1,Y1,X2,Y2);

SetFillStyle(9,1);

*

04 TURBO PASCAL

( ) ,

?

1

2

3

4

*

05 ,

.

1 GetLineStyle(0,0,1);

Rectangle(X1,Y1X2,Y2);

2 SetLineStyle(4,$3,1);

Rectangle(X1,Y1,X2,Y2);

3 SetLineStyle(4,3,1);

Rectangle(X1,Y1,X2,Y2);

4 SetLineStyle(0,13,1);

Rectangle(X1,Y1,X2,Y2);

*

06 - (4)

25% ?

1 SetFillPatern(1,2,4,8,1,2,4,8);

2 SetFillPatern(1,2,4,8,1,2,4,8;4);

3 SetFillPatern(11,22,44,88,11,22,44,88);

4 SetFillPatern(11,22,44,88,11,22,44,88;4);

*

07

?

1 SetFillStyle(Pattern:word;Color:word);

2 SetFillPatern(Pattern:FillPatternType;Color:Word);

3 GetFillSettings(var FillInfo:FillSettingsType);

4 SetLineStyle(LineStyle:Word;Pattern:Word;Thickness:Word);

*

08 ,,

, -?

1 SetAllPalette;

2 SetColor;

3 SetPalette;

4 GetPalette;

*

09

X.

1 Color:=X;

SetFillStyle(Pattern,Color);

2 GetFillSettings;

Color:=X;

SetFillStyle(Pattern;Color);

3 GetFillSettings;

Color:=X;

SetFillPattern(Pattern;Color);

4 GetFillSettings;

Color:=X;

SetFillStyle(Color;Pattern);

*

10 (4) (9)

, (1).

1 SetBKColor(4);

SetFillStyle(7,1);

Bar(X1,Y1,X2,Y2);

2 SetBKColor(4);

Bar(X1,Y1,X2,Y2);

SetFillStyle(7,1);

Bar(X1,Y1,X2,Y2);

3 SetBKColor(4);

SetFillStyle(1,9);

Bar(X1,Y1,X2,Y2);

SetFillStyle(7,1);

Bar(X1,Y1,X2,Y2);

4 SetFillStyle(9,1);

Bar(X1,Y1,X2,Y2);

SetFillStyle(7,1);

SetBKColor(4);

*

0

011 . 005

*

2 . SetPalette 002

*

3 . SetAllPalette . 002

*

4 . SetLineStyle 002

.

*

*

021 . 005

*

2 . SetColor . 堠 002

.

*

3 . , .. 003

.

*

4 . , SetBKColor002

.

*

*

031 . SetFillStyle.002

*

2 . 򠠠 002

. SetFillStyle.

*

3 . 005

*

4 .  002

.

*

*

041 . 002

( )

SetLineStyle(LineStyle,Pattern,Thickness).

LineStyle UserBitLn(4)

Pattern ,

. -

.

*

2 . 002

( )

SetLineStyle(LineStyle,Pattern,Thickness).

LineStyle UserBitLn(4)

Pattern ,

. -

.

*

3 . 005

*

4 . 002

( )

SetLineStyle(LineStyle,Pattern,Thickness).

LineStyle UserBitLn(4)

Pattern ,

. -

.

*

*

051 . GetLineStyle 002

, .

*

2 .

* 005

3 . Pattern , 002

.. - .

*

4 . 頠 002

Pattern .

*

*

061 . Color Pattern 002

.

*

2 . Pattern . 002

*

3 . Color. 002

*

4 . 005

*

*

071 . 005

*

2 . SetFillPattern 003

, , . -

.

*

3 .  002

.

*

4 . SetLineStyle 002

.

*

*

081 . , 004

.

*

2 . SetColor 򠠠 002

.

*

3 . 005

*

4 . GetPalette 頠 002

, .

*

*

091 . Color - 002

SetFillStyle. SetFillStyle -

.

*

2 . 005

*

3 . SetFillPattern 002

.

*

4 . SetFillStyle 003

.

*

*

101 . (X1,Y1,X2,Y2) . 002

*

2 . (X1,Y1,X2,Y2) 002

, .

*

3 . 005

*

4 . SetBKColor , 002

.

*

*

0

, -

-

, ,

.

* procedure Arc(X,Y:integer;StAngle,EndAngle,Radius:word);

1

(X,Y),

Radius StAngle

AndAngle.

.

* procedure CetArcCords(var ArcCoords:ArcCoordsType);

ArcCoords ,

Arc. ArcCoordsType

Graph ,

Arc.

* procedure Circle(X,Y:integer;Radius:word);

2

Radius

(X,Y),

.

* procedure Ellipse (X,Y:integer;

* StAngle,EndAngle,XRadius,YRadius:word);

3

(X,Y), StAngle

EndAngle ,

XRadius YRadius.

* procedure FloodFill(X,Y,Border:word);

, (X,Y) ,

,

SetFillStyle SetFillPattern.

Border ,

.

* procedure FillEllipse(X,Y:integer;XRadius, YRadius:word);

,

.

Ellipse.

4

5

* prosedure PieSlice(X,Y:integer;

* StAngle,EndAngle,Radius:word);

6

.

,

Arc.

* procedure Sector(X,Y:integer;

* StAngle,EndAngle,XRadius,YRadius:word);

7

,

-

.

Ellipse.

* procedure Randomize;

, .

System . , ,

RandSeed. -

.

* function Random(Rande:word):word;

. Rande -

, X

0=<X<Rande. Rande=<0, Random 0.

,

0=<X<1.

* procedure Delay(Time:word);

,

Crt.

* function KeyPressed:boolean;

true,

- , false - .

Crt.

* procedure PutPixel(X,Y:integer;Color:word);

(X,Y) Color.

Graph.

* procedure GetPixel(X,Y:integer):word;

(X,Y).

PutPixel -

" "

.

.............

Randomize;

repeat

PutPixel(Random(GetMaxX),

Random(GetMaxY),

Red);

Delay(50);

until KeyPressed;

.............

,

.

, , -

,

, .

-

.

8

9 E

0

01 (14) ɠ 8 (1) .

1 SetBKColor(14);

SetColor(1);

Circle(X,Y;Radius);

Circle(X,Y+d;Radius+d);

2 SetBKColor(1);

SetColor(14);

Circle(X,Y;Radius);

Circle(X,Y;Radius+d);

3 SetBKColor(14);

SetColor(1);

Arc(X,Y;0,360,Radius);

Arc(X,Y+d;0,360,Radius);

4 SetBKColor(1);

SetColor(14);

Arc(X,Y;0,360,Radius);

Arc(X,Y+d;0,360,Radius);

*

02 5 .

1 SetColor(4);

GoToXY(X,Y);

Arc(X+d,Y+d,0,180,K+d);

Arc(X,Y+d,0,90,d);

Arc(X+d,Y+d+k,0,180,k);

2 SetColor(4);

Line(X,Y,X+d,Y);

Line(X,Y,X,Y+d);

Arc(X+k,Y+k,0,90,k);

Arc(X+k,Y+k,270,360,k);

3 SetColor(4);

Line(X,Y,X+d,Y);

Line(X,Y,X,Y+d);

Arc(X+k,Y+k,0,180,k);

4 SetColor(4);

Line(X,Y,X-d,Y);

Line(X-d,Y,X-d,Y+d);

Circle(X-d,Y+d+k,k);

*

03 , Š .

1 Randomize;

SetFillStyle(0,15);

Ellipse(X,Y,0,359,a,b);

FloodFill(X,Y,Random(14);

2 SetFillStyle(0,15);

Ellipse(X,Y,0,359);

FloodFill(X,Y,Random(14);

3 SetFillStyle(0,15);

Randomize(15);

Ellipse(X,Y,0,359,a,b);

FloodFill(X,Y,Random);

4 SetFillStyle(0,15);

Randomize;

Ellipse(X,Y,a,b);

FloodFill(X,Y);

*

04 Arc?

1 . 2.

2 . .

3 . 360 .

4 . 180 .

*

05 ̠ RANDOMIZE?

1 Graph.

2 Crt .

3 Dos.

4 System.

*

06

?

1 PutPixel.

2 KeyPressed.

3 GetPixel.

4 Delay.

*

0

-

, ,

, ,

-

.

* procedure SetTextStyle(Font,Direction:word;

* CharSize:CharSizeType);

Font( -

DefaultFont(0), - TriplexFont(1),SmallFont(2),

SanSerifFont(3), GothicFont(4)),

Direction (HorizDir(0) - , VertDir(1) - ),

CharSize ( 1 10).

8*8 . -

.

.

" ", ..

,

.

. -

.

#

1

#

* procedure SetUserCharSize(MultX,DivX,MultY,DivY:word);

-

. MultX/DivX - -

.

2MultY/DivY - .

#

* function TextHeight(TextString:strig):word;

TextString -

() ,

SetTextStyle SetUserCharSize .

* function TextWidth(TextString:string):word;

TextString

, TextHeight.

* procedure SetTextJustify(Horiz,Vert:word);

-

. Graph

:

Horiz: LeftText =0 -

CenterText=1 -

RightText =2 -

Vert: BottomText =0 -

CenterText =1 -

TopText =2 -

""

SetTextJustify(0,2);.

#

* procedure OutText(TextString:string);

,

,

. ,

("" , -

), ("" ).

SetColor . -

SetTextStyle SetTextJustify.

SetUserCharSize.

TextWidth TextHeight.

* procedure OutTextXY(X,Y:integer;TextString);

(X,Y) ,

.

* procedure GetTextSettings(var TextInfo:TextSettingsType);

, , -

, , -

SetTextStyle SetTextJustify, -

. TextSettingsType

Graph , - Font,Direction:word;

CharSize:CharSizeType; Horiz,Vert:word; - -

SetTextStyle SetTextJustify.

Turbo-Pascal

, Borland Interna-

tional, -

. ,

.chr, ,

Turbo.exe Turbo-Pascal,

InstallUserFont.

* function InstallUserFont(NewFont:string):integer;

, ..

NewFont

-

Font SetTextStyly.

10 ,

4 .

4

: Bold.chr, Goth.chr, Sans.chr,Trip.chr.

,

0 , ,

.

.

-

, .

#

3

0

01 ,

, ?

1 .

2 .

3 , .

4

- .

*

02 ,

?

1 . :

InstallUserFont; -

TextWidth; -

OutText; -

2 . ,

InstalUserFont;

3 .

SetTextStyle;

4 . ,

.

*

03 ,

?

1 .

.

2 . SetUserCharSize .

3

SetUserCharSize.

4 . SetTexStyle.

*

04 OutText OutTextXY?

1 . .

2 .

3

.

4 OutText

, OutTextXY

.

*

05 "" Π (2) 6.

1 SetBkColor(15);

SetColor(2);

SetTextStyle(1,0,6);

OutTextXY(0,GetMaxY,'');

2 SetBkColor(15);

SetColor(2);

SetTextStyle(0,1,6);

OutTextXY(GetMaxX,0,'');

3 SetBkColor(15);

SetColor(2);

SetTextStyle(0,6,1);

OutTextXY(0,GetMaxY,'');

4 SetBkColor(15);

SetColor(2);

SetTextStyle(0,0,6);

OutTextXY(0,GetMaxY,'');

*

06 ""

300

SanserifFont

(4) 10.

1 SetColor(4);

SetTextStyle(SanSerifFont,HorizDir,10);

K:=TextWidth('');

SetUserCharSize(300,K,1,1);

2 SetColor(4);

SetTextStyle(SanSerifFont,VertDir,10);

K:=TextWidth('');

SetUserCharSize(300,K,1,1);

3 SetColor(4);

SetTextStyle(SanSerifFont,Horizdir,10);

K:=TextHeight('');

SetUserCharSize(1,1,300,K);

4 SetColor(4);

SetTextStyle(HorizDir,SanSerifFont,10);

K:=TextWidth('');

SetUserCharSize(300,K,1,1);

*

07 ""

80 , -ɠ SmallFont (1) 5.

1 SetTextStyle(SmallFont,0,5);

SetColor(1);

L:=TextHight('');

SetUserCharSize(1,1,80,L);

OutTextXY(10,200,'');

2 SetTextStyle(SmallFont,1,5);

SetColor(1);

L:=TextHight('');

SetUserCharSize(80,L,1,1);

OutTextXY(10,200,'');

3 SetTextStyle(SmallFont,1,5);

SetColor(1);

L:=TextHeight('');

SetUserCharSize(1,1,80,L);

OutText('');

4 SetTextStyle(1,5,SmallFont);

SetColor(1);

L:=TextHeight('');

SetUserCharSize(1,1,80,L);

OutText('');

*

08 ?

1 .

2 11 .

3 ,

.

4 Turbo-Pascal

, Borland International.

*

09 ?

1 6, - 2.

2 10, - 6.

3 11, - 7.

4 10, - 4.

*

10 ?

1 InstallUserFont;

2 GetTextSettings.

3 SetUserCharSize.

4 SetTextJustify.

*

0

011 . Turbo-Pascal  002

, .

*

2 . 005

*

3 . 002

.

*

4 . 002

.

*

*

021 . . 002

*

2 . InstallUserFont 頠 002

.

*

3 . 005

*

4 . . 002

*

*

031 . . 002

*

2 . SetUserCharSize 004

SetTextStyle.

*

3 . 005

*

4 . SetTextStyle , 002

.

*

*

041 . 002

.

*

2 . 004

,

*

3 . 005

*

4 . , 002

.

*

*

051 . 򠠠 002

SetTextStyle .

*

2 . SetTextStyle , 002

, ,

.

OutTextXY

.

*

3 . SetTextStyle 002

6 .

*

4 . 005

*

*

061 . 005

*

2 . 堠 002

, .

*

3 . 堠 002

, .

*

4 . 002

SetTextStyle.

*

*

071 . , - 002

, -

.

*

2 . 002

.

*

3 . 005

*

4 . 002

SetTextStyle.

*

*

081 . , 002

.

*

2 . , 002

.

*

3 . 005

*

4 . . 002

*

*

091 . 10 , 6 002

.

*

2 . 005

*

3 . 10 , 6 002

.

*

4 . 10 , 6 002

.

*

*

101 . 005

*

2 . GetTextSettings  002

.

*

3 . SetUserCharSize 002

.

*

4 . SetTextJustify 󠠠 002

.

*

*

0

, .. -

.

, , -

.

,,

.

.

, -

mod 2.

.

, .

#

* function ImageSize(X1,Y1,X2,Y2:word):word;

,

. (X1,Y1),(X2,Y2) -

-

.

, Width=X2-X1+1

heidht=Y2-Y1+1 .

, ,

64, 0, -

GraphResult - 11(

grError). , Turbo-Pascal

EGA

128.

1/2 .

-

.

GetMem.

* procedure GetMem(var p:pointer; Size:word);

Size,

,

p,

.

-

^. , -

, 65 521 , - 1 .

, -

,

.

, -

. -

.

* function MaxAvail:longint;

,

.

* procedure GetImage(X1,Y1,X2,Y2:word;var BitMap);

. (X1,Y1),(X2,Y2) -

.

BitMap - , -

,

GetMem.

, -

-

(50,50) (100,100):

#

.......

var p:pointer;

Size:word;

begin { }

........

Size:=ImageSize(50,50,100,100);

If MaxAvail<Size then begin RestoreCrtMode;

writeln(' ');

Halt(1) end

else begin GetMem(p,Size);

GetImage(50,50,100,100,p^);

end;

........

end. { }

#

* procedure PutImage(X,Y:integer; var BitMap;BitBlt:word);

-

.

(X,Y) -

.

BitMap - -

.

BitBlt -

:

NormalPut = 0; - -

XORPut = 1; - 2 - -

2

, 4()

4(), ,

:

4(10)+4(10) = 0100(2)+0100(2) = 0000(2) = 0(10) ,

.. .

OrPut = 2; - -

, 4(10) 4(10)=0100(2) 0100(2)=0100(2)=4(10),

.. .

#

AndPut = 3 - -

, 4(10)&4(10)=0100(2)&0100(2)=0100(2)= 4(10),

.. .

NotPut = 4 - - -

-

, 4(10)

- ----

4(10)= 0100(2) = 1011(2) = 11(10) - -

-

,

. ,

, ,

.

"" -

. -

.

Sistem Dispose.

#

* procedure Dispos(varp:pointer);

,

.

^ .-

.

,

50*50 ,

, :

.......

var p:pointer;

I:integer;

......

begin

......

GetMem(p,ImageSize(0,50,50,100)); { }

GetImage(0,50,50,100,p^); { }

for I:=1 to (GetMaxX-50) do { }

begin PutImage(I-1,50,p^,XORPut);{

}

PutImage(I-1,50,p^,NormalPut);{

end;

Dispose(p); { }

......

end.

#

1 :

#

* procedure SetActivePage(Page:word);

-

, Page. -

.

,

.

. 0 1

0- .

* procedure SetVisualPage(Page:word);

Page

. , -

.

,

:

#

......

var:integer;

......

begin

...... { 0-}

for I:=1 to(GetMaxX-50) do

{ }

begin Bar(I-1,50,I+50-1,100);

{ (I-1)}

SetActivePage(1);

{ 1- }

ClearDevice;

{ 1 }

Bar(I,50,I+50,100);

{ I }

SetVisualPage(1);

{ 1 }

SetActivePage(0);

{ 0- }

ClearDevice;

{ 0- }

end;

......

end.

#

* procedure Sound(Frequency:word);

.

Frequency

37 32767.

--------------------------------------------------------------------

 堠 蠠 ࠠ

--------------------------------------------------------------------

523,3 587,3 659,3 698,5 784,0 880,0 987,7

--------------------------------------------------------------------

-

2

.

-

-

Sound -

.

* procedure NoSond;

.

, "" 3 .

...... Sound(523);

Delay(3000);

NoSound; ......

2 .

#

* function ReadKey:char;

.

KeyPressed

true , ,

.

-

ASCII. ( , Alt,

Ctrl .. ,

ASCII.

null, .

.

,

.

, #.

, Ch

FuncKey true,

:

......

Ch:=ReadKey;

If Ch<> # then FuncKey:=False

else

begin

FuncKey:=true;

Ch:=ReadKey

end;

......

* procedure SetWriteMode(WriteMode:integer);

(

Bar3D). Craph.

:

CopyPut = 0 - - "" ,

.

XORPut = 1 - mod 2 - -

-

-

-

2.

, XORPut -

,

.

0

01 ImageSize?

1 .

2 .

3 , .

4 .

*

02 ?

1 .

2 .

3 1/2 .

4 1/4 .

*

?

1 . MaxAvail.

2 . GetMem.

3 , . .

4 , . Dispose.

*

04 , Π (4) ܠ Ѡ ޠ Putlmage (X,Y,p~,XORPut) (1) ?

1 (0).

2 -(11).

3 (4).

4 (5).

*

05 IBM PC EGA TURBO-PASCAL?

1 .

2 .

3 .

4 .

*

06 , ?

1 SetVisualActivePage

2 SetWriteMode

3 Dispose

4 SetActivePage

*

07 SetWriteMode?

1 .

2 .

3 , .

4 .

*

011 . GetMem. 002

*

2 . GetImage. 002

*

3 . 005

*

4 . PutImage. 002

*

*

021 . , 002 , 64, 1/2 .

*

2 . , 002 , 64, 1/2 .

*

3 . 005

*

4 . , 002 , 64, 1/2 .

*

*

031 . MaxAvail 005 , .

*

2 . , , GetMem 003 .

*

3 . 002 , . MaxAvail, .

*

4 . , MaxAvail. 003

*

*

041 . ࠠ 002 BitBlt XORPut 2:

4(10) + 1(10) = 0100(2) + 0001(2) = 0101(2) = 5(10)

*

2 . ࠠ 002

BitBlt XORPut 2:

4(10) + 1(10) = 0100(2) + 0001(2) = 0101(2) = 5(10)

*

3 . ࠠ 002 BitBlt XORPut 2:

4(10) + 1(10) = 0100(2) + 0001(2) = 0101(2) = 5(10)

*

4 . 005

*

*

051 . 002 .

*

2 . 005

*

3 . 002 .

*

4 . 002 .

*

*

061 . SetVisualPage 002 .

*

2 . SetWriteMode . 002

*

3 . Dispose . 002

*

4 . 005

*

*

071 . SetWriteMode 蠠 002 .

*

2 . 005

*

3 . SetWriteMode 蠠 002 .

*

4 . SetWriteMode 蠠 002 .

*

*

0

3







© 2009