.


:




:

































 

 

 

 





Begin end;

, . , . , , , . Procedure Function:

Function < >: < >;

, , :

< >:= <3>;

Delphi Result:

Result:= <3>;

, ( 4.1), , , ( 4.2).

4.1.

Unit Subprograms; ( , )

 

Interface { }

Procedure RunMe; ( RunMe, }

 

Function GetValue: Integer; ( GetValue, )

Implementation { )

Procedure RunMe;

Begin

{ RunMe}

End;

 

RunMe; GetValue;

V:= GetValue;

( RunMe}

{ GetValue

}

{ GetValue

V}

4.2. ,

Uses Subprograms; { Subprograms) Var

V: Integer; { }

Begin

RunMe; GetValue;

V:= GetValue;

( RunMe}

{ GetValue

}

{ GetValue

V}

, . , , .

Object Pascal . , .

4.2.1.

:

Procedure <> (< 1>: < 1>;...;

< 2>: < 2>);

:

Function <> (< >): < >;

, , , , , , , .

4.2.2.

Delphi :

1. ( . Value parameter ,

); 2. .

, , , . , .

, , (. . 4.1). , , , . . , , (. 4.3).

. 4.1.





:


: 2015-10-19; !; : 983 |


:

:

, , .
==> ...

1726 - | 1428 -


© 2015-2024 lektsii.org - -

: 0.012 .