.


:




:

































 

 

 

 





Unit . , , Unit Global, GLOBAL.PAS. . Uses < >
:
Uses - (. );
< > - , ; , , : Uses Crt, Graph, Global;

Uses... , Interface .

Interface. (, , ), / .

, :
Unit Cmplx;
Interface
Type
Complex = Record
Re: Real;
Im: Real;
End;

Procedure AddC (X, : Complex; Var R: Complex);
Procedure MulC (X, : Complex; Var Z: Complex);

Uses Cmplx; Complex - Addc Mulc Cmplx.

Implementation , . : , , , , ..

, .. , , , :

Unit Cmplx;
Interface
Type
Complex = Record
Re: Real;
Im: Real;
End;
Procedure AddC (X, : Complex; Var Z: Complex);

Implementation

Procedure AddC;
Begin
Z.Re:= .R + Y.Re;
Z.Im:= X.Im + Y.Im;
End;

End.

. Begin - Begin ( End ). , . . Unit FileText;
Interface

Procedure Print(S: String);

Implementation
Var
F: Text;
Const Name = 'output.txt;

Procedure Print;
Begin
WriteLn(F, S);
End;
{ }
Begin
Assign(F, Name);
Rewrite(F);
{ }
End.

 

59. -.

 

. : {$, ( ) .


- 7.0 :

 

  • - . , (+) (-), .
  • . , , , , .
  • . " " , .

, -, .

 

"Options" "Compiler". .

-

:
- ,
- .

, : Uses, Label, Const, Type, Procedure, Function, Begin, .

, : {$A+, B-}.

:
- (Word Align Data)
{$A+}
. . ( 8086 , 80X86 , , ( ) . {$A+} :
1. ,
2. .

 

(Include Directories).
{$I < >}
. . . .PAS. - 15 . 15- . . , Begin End .

. (Object Directories).
{$L < - >}
. (.Obj) .
{$L} , External.

(Memory Sizes).
{$M < >, < >}.
. - - 1024 65520. - ( ). - 0 65360. {$M} Unit .

(Conditional Defines).
{$ Define < >}
, .
- , - . }.

:
{$Define Debug}
..............
{$Ifdef Debug}
Writeln();
{$Endif}

60. .

. . . . .

- , - , (64 ), ( 16 ) . , , 200 - 300 .

- , .
8086 -
. - , 64 , 16 ( 0, 16, 32, 48 ..). - , , . 16 . , - .

, - ( ).

Type
PerPnt = ^PerRec;{ PerRec}
PerRec = Record
Name: String;
Job: String;
Next: PerPnt;
End;
Var
P1: ^Integer;
P2: ^Real;

- :
Var
PP: Pointer;

. , .

- , .

Var
P1,P2: ^Integer;
P3: ^Real;
PP:Pointer;
Begin
P1:= P2; {- }
P1:= P3; {- }

:
PP:= P3;
P1:= PP;
. .

 





:


: 2016-03-25; !; : 666 |


:

:

, ; , .
==> ...

2051 - | 1822 -


© 2015-2024 lektsii.org - -

: 0.014 .