.


:




:

































 

 

 

 


Pascal




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

1968 . . 1970 . , .

, 19- .

 

 

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

, . , - . .

. .

 

 

, ( , , , ..)

:

1. .

2. , , ( *{}?/+=-%$#@! ..).

3. 63. , Pascal 63 .

 

 

, , , .

, . . . . .

, , , .

Pascal . , , ( Var) . , .

:

:

 

, , , .

()
integer   -32768..32767 +, -, /, *, Div, Mod, >=, <=, =, <>, <, >
byte   0..255 +, -, /, *, Div, Mod, >=, <=, =, <>, <, >
word   0..65535 +, -, /, *, Div, Mod, >=, <=, =, <>, <, >
shortint   -128..127 +, -, /, *, Div, Mod, >=, <=, =, <>, <, >
longint   -2147483648..2147483647 +, -, /, *, Div, Mod, >=, <=, =, <>, <, >
real   2,9x10-39 - 1,7x1038 +, -, /, *, >=, <=, =, <>, <, >
single   1,5x10-45 - 3,4x1038 +, -, /, *, >=, <=, =, <>, <, >
double   5x10-324 - 1,7x10308 +, -, /, *, >=, <=, =, <>, <, >
extended   3,4x10-4932 - 1,1x104932 +, -, /, *, >=, <=, =, <>, <, >
boolean   true, false Not, And, Or, Xor, >=, <=, =, <>, <, >
char   ASCII +, >=, <=, =, <>, <, >

, .

, , :

  • ;
  • Ord, ;
  • Pred Succ, ;
  • Low High, .

. 1 2 (), :

  • 1 2 ;
  • 2 1 . :
type T1 = Integer; T2 = T1; T3 = T2;

. , , :

  • ;
  • , ;
  • - , - ;
  • ;
  • - , - .

. .

_ ( )

, Integer('Z') 'Z' , Byte(534) 22, 534 Word , Byte , .

 

 

Pascal

 

Pascal , . Pascal :

 

Program < >;

Uses < >;

Label < >;

Const < >;

Type < >;

Var < >;

< ( )>;

procedure < >(< >);

begin

end;

 

function < >(< >):< >;

begin

end;

 

Begin

< >

End.

 

: , <> .

 

 

Program < >;

, . . , , . .

: Program MyFirstProgram;

 

Uses < >;

, , ( *.tpu). Borlan, . , Uses. .

: Uses Crt, Graph;

, Uses .

 

Label < >;

Label , , . : . . , , , goto <>. , Label. Label , .

: Label m1, metka1, s;

, m1, metka1, s , , ..

, Label .

 

Const < >;

Const , . . , .

: Const g=9.81; Radius=456723; Name= ;

. , , Radius=456723. , Radius 456723, - , - . , Radius , 456723, Radius, , , , Const.

, Const .

 

Type < >;

Pascal , . Pascal . . , Type. .

: Type masStud = record

Fam,Name,Group:string;

Mat,Inf,Rus:integer;

end;

, Type .

 

Var < >;

, :

: Var x,y:real;

i:integer;

, Var . , , .

 

< ( )>;

, . , sin(2x) :

function sin2x(x:real):real;

begin

sin2x:=2*sin(x)*cos(x);

end;

( Var) ( Begin).

 

Begin

< >

End.

. . , .

, , . ( Var).

. - , , . Const.

 

:

 

. , . .

. , .

. ( ).

. ( ).

. , ( ), . , . :

year: integer = 2007;symb: char = '?';money: real = 57.23;

 





:


: 2016-12-18; !; : 649 |


:

:

. .
==> ...

1676 - | 1599 -


© 2015-2024 lektsii.org - -

: 0.044 .