:   :
:    
 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 




:

.

, . - - . , , , 7.0, Borland. , - , , , .[1] .

, . , . , , , . , .

, , , , , :

1.

2.

3.

4.

5.

6. .

, . , , . .

.

.

- . - , , , , . . , -.[2]

. :

1. , - , . . , . .

2. . , , , , . . , . .

3. ( Window). , , , .

4. - . . . . .

5.

.

- , : , . . - (). .

, . . .[3]

, . .

- .

- , , . - , . , ( , ), . ( )*.

, . :

, . , , .

.

. - , , , . . , , GoTo.

, . < >. .

Program redactor;

uses crt,printer; { }

label l1,l2,l3,l4; {}

Var a,f,f1,a2:string; { }

b,k:char;

c,u,y,a1,b1:text;

d,e,i,j,p,z:integer;

c1:boolean;

Procedure oform; { }

Begin

< >

End;

Begin

oform; { }

< >

Writeln(' (New), (Open),(Redact),'); {䠠

}

Writeln(' (Search),(Any key)');

b:=readkey; { }

case b of { }

.

'n','':Begin

l1:< > { }

End;

'o','':Begin

l2:< > { }

End;

'r','':Begin

l3:< > { }

End;

's','':Begin

l4:< > { }

End;

End;

< >

Writeln(' (New),) (Open),(Redact)'); {

}

Writeln(' (Search),(Any key)');

b:=readkey; { }

< >

case b of { }

'n','':GoTo l1; { }

'o','':GoTo l2;

'r','':GoTo l3;

's','':GoTo l4;

End;

.

< >

End.

. ( ). . , ( , ).

( ) .



.

. , , , , , . - , .

. :

z:=p*100 div z; { }

Writeln(' : ',p);

Write(' '); { }

If z>=90 Then Begin

Writeln('5')

Writeln(b1,5);

End;

else If z>=70 Then Begin

Writeln('4')

Writeln(b1,4);

End;

else If z>=40 Then Begin

Writeln('3')

Writeln(b1,3);

End;

else Begin

Writeln('2')

Writeln(b1,2);

End;

Readln;

Write(': '); { }

Readln(a);

d:=length(a); { }

Write(b1,a); { }

For i:=1 to 14-d do Write(b1,' ');

Write(': '); { , }

Readln(a);

Write(b1,a);

d:=length(a);

For i:=1 to 11-d do Write(b1,' ');

Write(': '); { , }

Readln(a);

Write(b1,a);

d:=length(a);

For i:=1 to 17-d do Write(b1,' ');

Write(b1,f);

d:=length(f);

For i:=1 to 8 do Write(b1,' ');

GetDate(g1,g2,g3,g4); { }

Writeln(b1,g3,'.',g2,'.',g1);

close(b1);

Window(15,10,50,19);

TextBackGround(black);

clrscr;

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

, .

, . , . -, 1(). GetTime.

Repeat { }

Window(60,20,70,21); { }

TextBackGround(black);

clrscr;

z2:=z2-1; { }

If z2<0 Then Begin { }

z1:=z1-1;

z2:=60;

End;

If (z1=0)and(z2=0) Then GoTo l1; { }

GetTime(g1,g2,g3,g4); { }

Writeln(z1,':',z2); { }

Write(g1,':',g2,' ',g3);

Delay(1000);

until keypressed;

, 1. . .

.

, , , .

, . MS-DOS . - MS-DOS, , , . . ASCII ! : , , . . , . , . . .

, . :

Procedure windows(x,y,x1,y1:integer; b:string);

Var a,t:integer;

Begin

Window (x+1,y+1,x1+1,y1+1); { }

TextBackGround(black);

clrscr;

Window(x,y,x1,y1); { }

TextBackGround(blue);

clrscr;

TextColor(darkgray); { }

Write(' ');

Write(chr(201)); { }

For a:=1 to 4 do Write(chr(205)); { }

Write(' ');

TextColor(green); { }

Write(b); { }

Write(' ');

TextColor(darkgray); { }

For a:=1 to (x1-x-9-length(b)) do Write(chr(205)); { }

Writeln(chr(187)); { }

For a:=1 to (y1-y-1) do Begin { }

Write(' ');

Write(chr(186));

For t:=1 to (x1-x-3) do Write(' ');

Writeln(chr(186));

End;

Write(' ');

Write(chr(200)); { }

For a:=1 to (x1-x-3) do Write(chr(205)); { }

Write(chr(188)); { }

Window(x+2,y+1,x1-2,y1-1); { }

TextColor(black);

End;

: Window . () . , , , , ?

:

Window(10,22,69,22); { }

TextBackGround(green); { }

clrscr; { }

. .

, case. . : , . , .

, . . , .

Procedure NewF;

Var h1:string; { }

Begin

Window(10,10,53,15);

TextBackGround(black);

clrscr;

Window(20,10,66,15); { }

TextBackGround(blue);

clrscr;

TextColor(black);

Write(' ');

Readln(a); { }

a:=a+'.ts'; { }

h1:=a;

Assign(c,a); { }

a:=a+'o'; { }

Assign(u,a); { }

Rewrite(c);

Rewrite(u);

Window(20,10,66,15); { }

TextBackGround(black);

clrscr;

Window(30,5,50,10); { }

TextBackGround(yellow);

clrscr;

GoToXY(30,6);

Write('- ');

Readln(d); { }

Writeln(c,' ',d);

GoToXY(30,8);

Writeln(' '); { }

Readln(f);

Writeln(c,f);

Writeln(' ');

Readln(f); { }

Writeln(u,f);

Window(30,5,50,10);

TextBackGround(black);

clrscr;

For i:=1 to d do Begin

Writeln(c);

Window(10,10,53,20); { }

TextBackGround(lightgray);

clrscr;

Writeln(i,'- : ');

Readln(a); { }

Str(i,f);

f:=f+')'; { }

Writeln(c,f);

Writeln(c,a);

Window(55,10,80,15); { }

TextBackGround(cyan);

clrscr;

Write(' ',i,'- ');

Readln(e); { }

Window(10,10,53,20); { }

TextBackGround(lightgray);

clrscr;

For j:=1 to e do Begin

Write(' ',j,')');

Readln(a); { }

Str(j,f);

a:=' '+f+')'+a;

Write(c,a);

End;

Write(c,'&'); { }

Window(55,10,80,15);

TextBackGround(cyan); { }

clrscr;

Write(' : ');

Readln(b); { }

Writeln(u,b);

End;

close(u); { }

Reset(u);

Readln(u);

close(c);

Window(55,10,80,15);

TextBackGround(black);

clrscr;

End;

, , , . -, . qs, - qso. , , . & , . , ( ), . , , . . . : , , . , . . .

, , . , . : $I-, IORESULT=0, $I+. , . .

. , , . . :

Procedure OpenF;

label l1;

Var f1:string; { }

Begin

p:=0;

Window(10,10,53,15);

TextBackGround(black);

TextColor(black);

clrscr;

Window(20,10,66,15); { }

TextBackGround(blue);

clrscr;

Writeln(' ');

Readln(a); { }

a:=a+'.ts'; { }

Assign(c,a); { }

f1:=a;

a:=a+'o'; { }

Assign(u,a); { }

delete(a,length(a),1);

Assign(b1,'c:\pascal\registr.dat'); { }

Append(b1); { }

Reset(c); { }

Window(20,10,66,15); { }

TextBackGround(black);

clrscr;

Reset(u);

Read(c,b); { }

Readln(c,b);

z:=ord(b)-ord('0'); { }

z1:=z;

Window(10,10,40,12); { }

TextBackGround(magenta);

clrscr;

Readln(u,a);

If length(a)>2 Then Begin{ }

Write(' ');

Readln(f); { }

If a<>f Then Begin

Write(' ');

GoTo l1; { }

End;

End

else Begin

close(u);

Reset(u);

End;

Readln(c,f);

Writeln(' "',f,'"'); { }

z2:=60;

repeat

Window(60,20,70,21); { }

TextBackGround(black);

clrscr;

TextColor(yellow);

z2:=z2-1; { }

If z2<0 Then Begin

z1:=z1-1;

z2:=60;

End;

If (z1=0)and(z2=0) Then GoTo l1;

Writeln(z1,':',z2);

GetTime(g1,g2,g3,g4); { }

Write(g1,':',g2,' ',g3);

Delay(1000);

TextColor(black);

Window(10,10,53,15); { , }

TextBackGround(cyan);

clrscr;

while not Eoln(c)or(b<>'&') do Begin

Read(c,b);

If b<>'&' Then Write(b);

End;

Writeln;

Window(55,10,80,15); { }

TextBackGround(blue);

clrscr;

Write(' ');

TextColor(yellow);

repeat{}

Window(60,20,70,21);

TextBackGround(black);

clrscr;

z2:=z2-1;

If z2<0 Then Begin

z1:=z1-1;

z2:=60;

End;

If (z1=0)and(z2=0) Then GoTo l1;

GetTime(g1,g2,g3,g4);

Writeln(z1,':',z2);

Write(g1,':',g2,' ',g3);

Delay(1000);

until keypressed;

Window(55,10,80,15);

TextBackGround(blue);

clrscr;

TextColor(yellow);

b:=readkey; { }

Write(b); { }

Readln(u,k);

Readln(c);

If k=b Then p:=p+1; { , }

Window(60,20,70,21);

TextBackGround(black); { }

clrscr;

TextColor(black);

z2:=z2-1; {}

If z2<0 Then Begin

z1:=z1-1;

z2:=60;

End;

If (z1=0)and(z2=0) Then GoTo l1;

GoToXY(70,15);

GetTime(g1,g2,g3,g4); { }

Writeln(z1,':',z2);

Write(g1,':',g2,' ',g3);

Delay(1000);

until Eof(c);

l1:f1:=f1+'o';

close(c); { }

close(u);

Window(55,10,80,15); { }

TextBackGround(black);

clrscr;

Window(10,10,53,15);

TextBackGround(black);

clrscr;

Window(15,10,50,19);

TextBackGround(blue);

clrscr;

< >

End;

. , , , .

!!! , Disk Read Error!!!

. .

. . . , , , . , . , , , , . , :

Procedure RedactF;

Begin

Window(10,10,53,15);

TextBackGround(black);

TextColor(black);

clrscr;

Window(20,10,66,15); { }

TextBackGround(blue);

clrscr;

Writeln(' ');

Readln(a); { }

a2:=a;

Window(20,10,66,15); { }

TextBackGround(black);

clrscr;

Assign(c,a); { }

a:=a+'o'; { }

Assign(u,a); { }

delete(a,length(a),1);

a:=a+'1'; { }

Assign(y,a); { }

delete(a,length(a),1);

a:=a+'2'; { }

Assign(a1,a); { }

Reset(c); { }

Reset(u);

Rewrite(y);

Rewrite(a1);

Window(5,5,50,20); { }

TextBackGround(lightgray);

clrscr;

Writeln(' Enter:');

repeat

while not Eoln(c)or(b<>'&') do Begin { Enter}

Read(c,b);

If b<>'&' Then Write(b);

End;

Readln(c);

Readln;

until EOF(c);

close(c); { }

Reset(c);

Window(5,5,50,20); { }

TextBackGround(black);

clrscr;

Window(30,5,58,10); { }

TextBackGround(yellow);

clrscr;

Read(c,b); { }

Readln(c,b);

d:=ord(b)-ord('0');

Write(' : ');

repeat

Readln(z); { }

If z>d Then Writeln(' '); { }

until z<=d;

Window(30,5,58,10); { }

TextBackGround(black);

clrscr;

Window(10,10,53,20); { }

TextBackGround(lightgray);

clrscr;

close(c); { }

Reset(c);

p:=0;

repeat

while not EOLN(c) do Begin { }

Read(c,b);

Write(y,b);

End;

Readln(c);

Writeln(y);

p:=p+1;

until p=z*3; { }

p:=0;

while not (p=z-1) do Begin { }

p:=p+1;

Readln(u,b);

Writeln(a1,b);

End;

while not EOLN(c) do Begin { 0 2}

Read(c,b);

Write(b);

End;

Readln(c);

Writeln;

while not EOLN(c) do Begin { }

Read(c,b);

Write(b);

End;

Readln(c);

Writeln;

while not EOLN(c) do Begin

Read(c,b);

Write(b);

End;

Readln(c);

Writeln;

Writeln(' :');

Writeln(z,')'); { }

Writeln(y,z,')');

Readln(f);

Writeln(y,f);

Window(55,10,80,15); { }

TextBackGround(cyan);

clrscr;

Write(' ',z,'- ');

Readln(e); { }

Window(10,10,53,20); { }

TextBackGround(lightgray);

clrscr;

For j:=1 to e do Begin { }

Write(' ',j,')');

Readln(a);

Str(j,f);

a:=' '+f+')'+a;

Write(y,a);

End;

Writeln(y,'&');

Window(55,10,80,15); { }

TextBackGround(cyan);

clrscr;

Write(' : ');

Readln(b); { }

Window(55,10,80,15); { }

TextBackGround(black);

clrscr;

Writeln(a1,b);

repeat

while not EOLN(c) do Begin { }

Read(c,b);

Write(y,b);

End;

Readln(c);

Writeln(y);

until EOF(c);

Readln(u);

while not EOF(u) do Begin { }

Readln(u,b);

Writeln(a1,b);

End;

Window(10,10,53,20); { }

TextBackGround(black);

clrscr;

close(c); { }

Erase(c); { }

close(u);

Erase(u); { }

close(y);

Rename(y,a2); { }

a2:=a2+'o';

close(a1);

Rename(a1,a2); { }

End;

, , . , , . , .

. . . , , , . . registr.dat . .

Procedure SearchF;

Begin

Assign(b1,'c:\pascal\registr.dat'); { }

Reset(b1); { }

Window(10,10,53,15); { }

TextBackGround(black);

TextColor(black);

clrscr;

Window(5,10,70,13); { }

TextBackGround(green);

clrscr;

Write(' ');

Readln(a); { }

while not EOF(b1) do Begin { }

Readln(b1,f); { }

For i:=1 to length(a) do f1:=f1+f[i]; { }

If a=f1 Then Begin { }

Writeln(f); { }

c1:=true; { }

End;

f1:=''; { }

End;

If c1=false Then Write(' . .');

{ }

Readln;

close(b1); { }

Window(5,10,70,13); { }

TextBackGround(Black);

clrscr;

End;

: , .

:

. Turbo Pascal . Lst, Writeln. , , . : . , . , .

, , Assembler, Turbo Pascal:

Procedure PrintF;

Begin

TextColor(black);

Window(10,10,53,15); { }

TextBackGround(cyan);

clrscr;

Writeln(' ?'); { }

Window(60,24,70,24);

TextBackGround(black);

clrscr;

repeat { }

h:=g3;

GoToXY(50,22);

GetTime(g1,g2,g3,g4);

TextColor(yellow);

Write(g1,':',g2,' ',g3);

Delay(1000);

clrscr;

until keypressed;

Window(10,10,53,15); { }

TextBackGround(cyan);

clrscr;

Readln(a); { }

Assign(b1,a); { }

Reset(b1); { }

Writeln(' MS-DOS'); {}

repeat { }

Window(60,24,70,24); { }

TextBackGround(black);

clrscr;

h:=g3;

GoToXY(50,22);

GetTime(g1,g2,g3,g4); { }

TextColor(yellow);

Write(g1,':',g2,' ',g3);

clrscr;

Readln(b1,f); { }

Writeln(Lst,f); { }

until EOF(b1);

Window(10,10,53,15); { }

TextBackGround(black);

clrscr;

End;

: , . - .

.

. , , : , , , , . . -. , . - .

- - , , . , , . , Turbo Vision Object Toolkit, - . , , 1991 , , 1992 - , , .[4]

Delphi 5. , , , , . Turbo Pascal .

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

Turbo Pascal , . , . - , , . :

.

Type < >=object

< >

< >

End;

(). : :

< >.< >

.

- : , . , case, .

, .

- panel - , . , . , . , Enter . .

:

1.

2.

3.

4.

5.

6.

7.

.

Program redactor;

uses crt,printer,dos;

type panel=object { }

x:integer; { }

Procedure left(b:char); { }

Procedure right(b:char); { }

Procedure choose; { }

End;

Var a,f,f1,a2:string; { }

b,k:char;

c,u,y,a1,b1:text;

d,e,i,j,p,z,z1,z2:integer;

c1:boolean;

g:panel;

g1,g2,g3,g4,h:word;

Procedure panel.left; { }

Begin

Window(x,22,x+9,22); { }

TextBackGround(green);

clrscr;

- . , .

Window(10,22,69,22); { }

TextBackGround(green);

clrscr;

TextColor(brown); { }

Write('頠 '); {

}

If x>=20 Then x:=x-10; { }

. , , .

Window(x,22,x+9,22); { }

TextBackGround(blue);

clrscr;

case x of { }

.

10:Begin

TextColor(green);

Write('');

End;

20:Begin

TextColor(green);

Write('');

End;

30:Begin

TextColor(green);

Write('');

End;

40:Begin

TextColor(green);

Write('');

End;

50:Begin

TextColor(green);

Write('');

End;

60:Begin

TextColor(green);

Write('');

End;

End;

End;

Procedure panel.right; { }

Begin

Window(x,22,x+9,22); { }

TextBackGround(green);

clrscr;

Window(10,22,69,22); { }

TextBackGround(green);

clrscr;

TextColor(brown); { }

Write('頠 '); { }

, , , , .

If x<=50 Then x:=x+10; { 蠠

}

Window(x,22,x+9,22); { }

TextBackGround(blue);

clrscr;

case x of { }

10:Begin

TextColor(green);

Write('');

End;

20:Begin

TextColor(green);

Write('');

End;

30:Begin

TextColor(green);

Write('');

End;

40:Begin

TextColor(green);

Write('');

End;

50:Begin

TextColor(green);

Write('');

End;

60:Begin

TextColor(green);

Write('');

End;

End;

End;

Procedure pannel; { }

Begin

Window(10,22,69,22);

TextBackGround(green);

clrscr;

TextColor(brown);

Write('頠 ');

End;

<Procedure NewF;> { }

<Procedure OpenF;>

<Procedure RedactF;>

<Procedure SearchF;>

<Procedure PrintF;>

Procedure panel.choose; { }

Begin

case x of { }

10:NewF;


20:OpenF;

30:RedactF;

40:SearchF;

50:PrintF;

60:b:='e';

End;

End;

: , . , .

.

. . , , - crt. .

Procedure oform;

Begin

TextBackGround(green); { }

clrscr;

TextColor(red); { }

GoToXY(20,10); { }

Write(' '); { }

TextColor(darkgray); { }

GoToXY(20,12);

Writeln(': '); { }

GoToXY(20,14);

Writeln(' 09.05.2000'); { }

TextColor(white); { }

GoToXY(20,16);

Writeln(' '); { }

Readln;

TextBackGround(black);

clrscr;

End;

Begin

.

.

, , , , : , , . .

g.x:=10;

oform; {}

TextColor(green);

GoToXY(30,1);

Writeln(' . V 1.01.'); { }

GoToXY(23,2);

Writeln(': (09.05.2000)');

pannel;

repeat

Window(60,24,70,24);

TextBackGround(black);

clrscr;

repeat {}

h:=g3;

GoToXY(50,22);

GetTime(g1,g2,g3,g4);

TextColor(yellow);

Write(g1,':',g2,' ',g3);

Delay(1000);

clrscr;

until keypressed;

b:=readkey; { }

( )

case b of

'1':g.left(b);

'3':g.right(b);

'0':Begin

Window(10,10,53,15);

TextBackGround(blue);

clrscr;

g.choose;

End;

End;

until b='e';

Window(10,10,53,20); { }

TextBackGround(black);

clrscr;

Window(10,10,80,15);

TextBackGround(black);

clrscr;

Window(30,10,35,12);

TextBackGround(red);

clrscr;

TextColor(blue);

Writeln('!');

Readln;

End.

, .

: .

, . , . , , . .

, . Pascal, Object Pascal. , . , -. . , , . , Delphi , . , , . , . , , .

, . . , MS-DOS, , , WORD ACCESS. , , .

Delphi . . . , , .

. , . . . , . , . , , . .

:

1. Turbo Pascal 7.0 1998.

2. Delphi 5 (, , ) 2000.

3. 1 1998. . .

4. 2 1998. . . - ̻

5. 8 1999. . .

6. Delphi,



[1] : Turbo Pascal

[2] :

[3] : Turbo Pascal

*

[4] : Delphi 5



      ©2010