.


:




:

































 

 

 

 


. .




, - :

Procedure sum(var a,b: real);

: sum(a,b);

Function dif(var d: integer);

: m:= n+dif(d);

 

. . . Program Factorial; var n: integer; Function Fac(n: integer): real; begin {Fac} if n < 0 then writeln ( N); else if n = 0 then Fac:= 1 else Fac:= n*Fac(n-1) end; {Fac} {----------} begin {Factorial} repeat readln(n); writeln(n! = , Fac(n)) until EOF end. {Factorial} . , . : procedure B(j: real); forward; procedure A(i: real); begin B (i); { } end; procedure B; begin A(j); { A} . end;   . , ( ) function MyFunc(var x: integer): integer; begin if x < 0 then x:= 0 else MyFunc:= x+10 end; var i: integer; begin {main} i:= 1; i:= 2*MyFunc(i)-100; {. } MyFunc(i); {. } end. {main)

 


9. , . : , .

. , , , -.

, . , :

Type

colors = (red, white, blue);

cardsuit = (clubs, diamonds, hearts, spades);

0, 1 .. 65536 .

Var

col: colors;

card: cardsuit;

col:= red; col:= hearts;

card:= diamonds; card:= blue;

 

- ( ) ( -). :

<.>.. <.>. :

type var

dig = 48..57; date: 1..31; , . . , , , . , , . : HIGH (x) -, x; LOW (x) .

String. . array [0..N] of CHAR:

var st: String;

begin;

..

if st[5] = A then ..

end.

 

0 . 1. .. (, ).

LENGTH(st). + (): st = a+ b ( st = ab). N, .

:

CONCAT(s1 [,s2,sn]) string; , - s1,s2sn.

COPY(st, index, count) string; st count-, index.

DELETE(st, index, count) , st count-, index.

INSERT(subst, st, index) ; subst st, index.

LENGTH(st) integer; st.

POS(subst, st) integer; st subst , ; , .

STR(x [:WIDTH [:DECIMALS]], st) , st. WIDTH DECIMALS : WIDTH , , DECIMALS ( ).

VAL(st, x, code) , std , ; code , , . st, . .

UPCASE(ch) CHAR, ch .

 

3 :

<> = FILE OF <>; <> ()

<> = text; FILE, OF , text

<> = FILE; , <> - , .

:

1) ( FILE OF);

2) ( text);

3) ( FILE).






:


: 2016-10-27; !; : 970 |


:

:

,
==> ...

1555 - | 1433 -


© 2015-2024 lektsii.org - -

: 0.01 .