.


:




:

































 

 

 

 


1: - . , , . API- (Application Programming Interface - ), , ( ) API. - , - /++. -, , , (), : . -, , , , (, , ), . , : API Microsoft, Borland . Borland , Microsoft - , , , API , . , API- , , , , , .

2: :

3: Turbo Pascal . Turbo Pascal UCSD Pascal, , , Apple II. Turbo Pascal Blue Label Pascal, 1981 NasSys Nascom. Compass Pascal CP/M, Turbo Pascal DOS CP/M. Turbo Pascal Apple Macintosh 1986 , 1992 . 1982 , Borland. 1983 Turbo Pascal, . Turbo Pascal $49,99. , . Turbo , . Turbo Pascal , . 150 . , , . 300 , . . , . WordStar. , . , . , . . . . ; . . , IBM PC, . , . , Borland Pascal, Intel , . , ; -, . , . Borland -. 1990- TP/BP . , Microsoft Pascal - Turbo Pascal. , Borland Microsoft Turbo Basic( BASIC, Turbo Pascal), Microsoft Microsoft Pascal. Microsoft QuickPascal, 100%- Turbo Pascal. Borland , . 5.5 - . 7. Borland Pascal 7 DOS, DOS DOS Windows 3.x, Turbo Pascal 7 DOS-.

 

.

, , . , . . , : [1,1,2,3,5,8] (, ). ́ , , , . , . - . (begin-end).

, , , . - , , . Record, . End. , , . With - . Writeln Write, . Assign . Rewrite , . , , . Reset , , , .

 

 

. . USB. , . , , . , ,
. ( ). , , , , () .

, interface. uses , ( ). : , , , . inline. ( , inline). .

, . . . , . Java, Object Pascal Delphi C++, : , .

Java , .

Object Pascal , Delphi 2 COM-. , Delphi , , COM.

C++ , , . , (, ) .

, .

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

. , . , , , , . -60, , -2, , . , .

, . :

  • ( );
  • ( );
  • ;
  • .

:

1. ;

2. ;

3. ;

4. .

.

:

1. ;

2. ;

3. --- .

 

FOR WHILE REPEAT

IF ( ) IF ( ) CASE
     

- , . . , - .

. : . Pascal ( ) True False. : 1 - , 0 - . , , - , - . Pascal Boolean (. - ). , True False. "":

Var X: Boolean;
X:=False;

. 4 . - . .

1. :NOT("")

, : , , , . , , NOT , . :

k:=True;
m:= not (k);
n:= not m;
p:= not (not (m));

, Boolean. , , :

  • k True;
  • , NOT k False: m False;
  • N m, .. True;
  • m , .. p False.

2. () AND("")

NOT, AND ( ) . , , , . , . , , : 1, - 0, , . :

a:=True;
b:=False;
c:=True;
d:=a and b;
e:=a and c;
f:= not (b) and c;

d False, .. ( - , ) False (b). e True, a c . , f True, not(b) - c .

3. () -OR("")

AND, OR . "" " ": - , . False , .

a:=False;
b:=True;
c:=a or b;
d:= not (b) or a;

c True, d - False.

4. "" -XOR

True, , - , .. .

a:=True;
b:=False;
c:=a xor b;
d:= not (a) xor b;
e:= not (a) xornot (b);

c , a b , d - , .. False. , e .

Program CR1_26;

Uses crt;

const players=10; {}

Type matrix=array[1..players,1..players] of char; { }

label 1;

Var m:matrix; { }

i:integer; { }

j:integer; { }

result:array[1..players] of real;

winner:integer;

function wnpWNP(c:char):char;

begin wnpWNP:=c; if c='' then wnpWNP:='';if c='' then wnpWNP:='';if c='' then wnpWNP:='' end;

Begin

clrscr;

 

for i:=1 to players do for j:=1 to players do

if i=j then m[i,j]:='-' else if j>i then begin

1: write(' ',i,' ',j,' (,,): ');

Readln(m[i,j]);m[i,j]:=wnpWNP(m[i,j]);

if not (m[i,j] in ['','','']) then goto 1;

end;

 

for i:=1 to players do for j:=1 to players do

if i>j then begin

if m[j,i]='' then m[i,j]:='';

if m[j,i]='' then m[i,j]:='';

if m[j,i]='' then m[i,j]:='';

end;

 

for i:=1 to players do begin

for j:=1 to players do write(' ',m[i,j]);

writeln;

end;

 

for i:=1 to players do result[i]:=0;

 

for i:=1 to players do for j:=1 to players do begin

if m[i,j]='' then result[i]:=result[i]+1.0;

if m[i,j]='' then result[i]:=result[i]+0.5;

end;

 

winner:=1;

for i:=2 to players do if result[i]>result[i-1] then winner:=i;

Writeln(' ',winner,'!!!');

 

while not keypressed do; readln

End.

program CR2_26;

uses crt;

const maxAb=10; { }

label 1;

type Ab = record { Ab 6 : F, B, S, Sc, N, I }

FullName: string[25];

BirthYear: integer;

ScoolYear: integer;

Scool_REZ: array[1..10] of Byte;

NeedPlace: byte;

Incom_REZ: array[1..4] of Byte;

end;

 

var Abit: array[1..maxAb] of Ab; { Abit Ab }

sp: text; { }

last,rr: byte; { LAST, }

 

procedure saveAb(sAb:Ab); { }

var j: byte;

begin

with sAb do begin

writeln(sp,Fullname);

writeln(sp,BirthYear);

writeln(sp,ScoolYear);

For j:=1 to 10 do write(sp,Scool_Rez[j],' ');writeln(sp);

writeln(sp,NeedPlace);

For j:=1 to 4 do write(sp,Incom_Rez[j],' ');writeln(sp);

end;

end;

 

procedure WaitEnter;

begin

write(' Enter >> ');

while not Keypressed do; readln

end;

 

procedure vvod; { }

var i,j,n:byte;ch:char;

begin { assign }

last:=maxAb;

rewrite(sp); { }

for i:=1 to maxAb do with Abit[i] do begin

clrscr;writeln(':');writeln;

while KeyPressed do ch:=ReadKey;

write(i,'. ... - '); readln(Fullname);

write(i,'. - '); readln(BirthYear);

write(i,'. . - '); readln(ScoolYear);

write(i,'. . (10!) - '); For j:=1 to 10 do read(Scool_Rez[j]);

write(i,'. . (0/1) - '); readln(NeedPlace);

write(i,'. . . (4!) - '); For j:=1 to 4 do read(Incom_Rez[j]);

saveAb(Abit[i]);

WaitEnter;

end;

close(sp); { }

end;

 

procedure print; { }

var i,j:byte;YesNo:string[3];

begin

clrscr;

reset(sp); { }

for i:=1 to maxAb do with Abit[i] do if not eof(sp) then begin

{ }

last:=i;

readln(sp,Fullname);

readln(sp,BirthYear);

readln(sp,ScoolYear);

For j:=1 to 10 do read(sp,Scool_Rez[j]);readln(sp);

readln(sp,NeedPlace);

For j:=1 to 4 do read(sp,Incom_Rez[j]);readln(sp);

end;

close(sp); { }

if last<>0 then for i:=1 to last do with Abit[i] do begin

writeln(' (',i,'/',last,'):');

writeln(i,'. ... - ',Fullname);

writeln(i,'. - ',BirthYear);

writeln(i,'. . - ',ScoolYear);

write(i,'. . (10) - ');For j:=1 to 10 do write(Scool_Rez[j],' ');writeln;

write(i,'. . - ');YesNo:=' ';if NeedPlace=0 then YesNo:='';writeln(YesNo);

write(i,'. . . (4) - ');For j:=1 to 4 do write(Incom_Rez[j],' ');writeln;

WaitEnter;

end;

end;

 

procedure work;

var i,j:integer;good:array[1..maxAb] of boolean;

begin

rewrite(sp); { }

for i:=1 to last do begin good[i]:=true;

for j:=1 to 4 do if Abit[i].Incom_Rez[j]<3 then good[i]:=false;

end;

j:=0; for i:=1 to last do if good[i] then saveAb(Abit[i]) else Inc(j);

writeln(' : ',j);

WaitEnter;

close(sp); { }

end;

 

begin { }

assign(sp,'z:\mc-11.2b\shakirov\vedom.dat'); { sp VEDOM.DAT }

last:=0;

1:rr:=0; while not (rr in [1..4]) do begin {clrscr;}

write(' (1 - , 2 - , 3 - , 4 - END!): '); readln(rr) end;

case rr of

1: begin vvod; goto 1 end;

2: begin print; goto 1 end;

3: begin if last<>0 then work; goto 1 end;

end;

writeln;writeln('END!');writeln;WaitEnter;

end.

, Turbo Pascal . 2 , , . .

 

 

1. . . .: , 1989

 

2. ., . . .: , 1982

 

3. .., .. -- .: , 1987

 

4. .. Turbo Pascal 6.0 -- .: , 1992

 

5. .. 7.0. -- .: , 1997 http://pascal.dax.ru/files/books/TurboPascal.zip

 

6. .. Turbo Pascal ( 6.0 7.0). 3-, .: - "", 1997. - 320

 

7. .. Turbo Pascal. []. 2- ./ .: , 2007. - 268 .: .

 

8. .. . . .1, ., , 1992.

 

9. .., .. Turbo Pascal 7.0 / . .. : +; .: , 1998

 

10. . : . . . - .:, 1987

 



<== | ==>
| , 1,32 . ?
:


: 2017-02-11; !; : 344 |


:

:

, , . , .
==> ...

1833 - | 1679 -


© 2015-2024 lektsii.org - -

: 0.186 .