Delphi- . , , Project/Compile Ctrl+F9. :
1) , . *.Dcu. , , , ( Uses);
2) , , Delphi *.Exe , .
( ) , , , . Project/Build All .
Run/Run F9. , Project/Compile Project/Build All, .
. Project Options, Project/Options , , .
(. 17) :
Forms , ;
Application , , ;
Compiler ;
Linker ;
Directories/Conditions ;
VersionInfo ;
Packages , , .
Delphi , . , , . Forms . Autocreate forms , . .
, , , Title Application. , , , .
|
|
Compiler . *.Exe-.
2 .
Object Pascal
Delphi Object Pascal. , , Pascal Borland Pascal. , , . If-Then-Else, Repeat-Until, . Delphi , Pascal, . , , Borland Pascal.
Object Pascal - . Delphi . (, , ..) . , .
Turbo Pascal Object Pascal. Object Pascal Object Turbo Pascal.
, . . . , ( , , Delphi), .
Object Pascal Object. Pascal , , . Object Pascal : , , .
, , , . . , . , . , , . , , , , . , Property. Color, Width Height ..
, . :
Type
TAnObject = Class(TObject)
Function GetColor: TSomeType;
|
|
Procedure SetColor (aNewValue: TSomeType);
Property Aolor: TSomeType Read GetColor Write SetColor;
End;
Aolor GetColor SetColor. . :
AnObject.Acolor:= Avalue;
Avariable:= AnObject.Acolor;
.
. Windows , Windows, .
Object Pascal , :
Property OnMyEvent: TMyEvent Read FOnMyEvent Write FOnMyEvent;
FOnMyEvent , . , . ( , Windows).
Delphi . Class. , lass . . . Delphi:
Type
TForm1 = Class(TForm)
Label1: TLabel;
Label2: TLabel;
CloseBtn: TBitBtn;
OkBtn: TBitBtn;
End;
Var Form1: TForm1;
TForm1, TForm, . Class. , : Label TLabel ( , TLabel) TBitBtn. Form1.
, , , . , .
(private), (public), (protected) (published) .
, , . , , , .
, , , . , .
, protected , , , .
Object Pascal Tbject. , , . .
, , .
|
|
Type
TSeries = Class(TObject);
Public
{ }
NumberOf Samples, NumberOfMaterials: Integer;
IsStandard, IsNoStandard: Boolean;
MaterialName: TStringList;
{}
Function CountSamples: Integer;
Function CountMaterials: Integer;
Function Standard: Boolean;
Procedure GetNames;
End;
: , , . . : ; ; .
, . implementation- . . GetNames . .
, TObject . .
. 18 Delphi. TPersistent TObject: , . TComponent, , . TControl , , TWinControl Windows- ..
Delphi 300 .