.


:




:

































 

 

 

 


Memo1.Clear; // Memo1




. ., . .

 

DELPHI.

 

1 2-

 

2005


681.3.06 (075.8)

32.973-018 73

C 38

 

 

: ...,

 

 

C35 . ., .. DELPHI. : 1 2- Ж .: , 2005. 80 .: .

 

ISBN 985-444-___-_

 

Object Pascal DELPHI, . .

10 .

 

 

681.3.06 (075.8)

32.973-018 73

 

Ó . ., .., 2005

ISBN 985-444-___-_ Ó , 2005


1. DELPHI.

ⅅ..4

2. DELPHI.

ⅅ.........13

3.

DELPHI. ⅅ.19

4. .

ⅅ..25

5.

C ȅ34

6.

酅.40

7.

. C ߅.46

8.

ⅅ52

9.

腅.61

10.

ⅅ69

1.

...77

2. .78

...79


 

 

1. DELPHI.

: DELPHI. .

1.1. DELPHI

DELPHI . , , , . DELPHI , . 1.1.


.1.1.

1 ; 2 ; 3 ;

4 - ; 5 ;

6- ; 7

. . . DELPHI, (), . (), . , , , , .

( c F11) . Properties () , Events () (, ).

Windows- . . , .

, . DELPHI Object Pascal. , Windows-. ( uses) ( type) (. 1.1).

DELPHI , ( OnClick, OnCreate). , Events (procedure), begin end Object Pascal .

F12.

1.2. DELPHI

DELPHI ( pas), ( dfm) (. dpr), .

, . DELPHI .

(Unit) . , PASCAL.

:

unit Unit1;

Interface

//

Implementation

//

Begin

//

End.

, , , , (Uses). , , , , . .

DELPHI dcu, pas dfm. dcu exe. , ~df, ~dp, ~pa, , .

1.3.

: x, y, z

.

, .1.2.

1.3.1. .

FileNewApplication. , : , . , .

1.3.2.

(Name) (aption) Form1. . Properties Caption . . N1. . . 740102 ...

1.3.3. (TEdit)

, , , ( TEdit). ( String) Text.

TEdit x, y, z (. . 1.2).

Standard , . TEdit , (. 1.1) Edit1, Edit2, Edit3. . Edit ( Font).

, , x, y, z , Tdit Text . , Edit.Text, , x:= StrToFloat (Edit1.Text). , integer, StrToInt. , , Windows ( ). 1 7.

1.3.4. (TLabel)

. 1.2 . TLabel.

Standard ( Label1). ( TLabel). , , . Caption , X:, ( Font).

1.3.5. (TMemo)

, , ( TMemo).

TMemo . . Memo1. , Properties ScrollBars SSBoth.

, Memo, Memo1.Lines. Memo1.Lines.Add ( String). Memo1.Clear.

, , String. , u:=100 , Memo1.Lines.Add( u=+IntToStr(u)) , u=100. u:=-256,38666 , Memo1.Lines.Add( u=+FloatToStrF(u,fffixed,8,2)) u= -256,39. , .

1.3.6. (FormCreate)

, , ( OnCreate). (TForm1.FormCreate). x, y, z TEdit, Memo . . , : Procedure TForm1.FormCreate(Sender:TObject). begin end ( , ).

1.3.7. (ButtonClick)

( Button), Standart . (Caption) Button1 . .

, , (Procedure TForm1.ButtonClick(Sender:TObject);).

(. 1).

! ButtonClick FormCreate Delphi ( ). , begin nd Delphi. .

1.3.8.

Run Run, F9, . , , exe. (.1.2).

.1.2

. ( ) . Memo1 . x, y, z Edit - . DELPHI Run ProgramReset. .

1.1 . , , , Delphi .

1.1.

unit Unit1;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,

Forms, Dialogs, StdCtrls;

type

TForm1 = class(TForm)

Label1: TLabel;

Edit1: TEdit;

Label2: TLabel;

Edit2: TEdit;

Label3: TLabel;

Edit3: TEdit;

Label4: TLabel;

Memo1: TMemo;

Button1: TButton;

procedure FormCreate(Sender: TObject);

procedure Button1Click(Sender: TObject);

private { Private declarations }

public { Public declarations }

end;

var

Form1: TForm1;

implementation

{$R *.dfm}

 

procedure TForm1.FormCreate(Sender: TObject);

begin

Edit1.Text:='3,4'; // x

Edit2.Text:='2,8'; // y

Edit3.Text:='5,6E-3'; // z

Memo1.Clear; // Memo1

end;

 

procedure TForm1.Button1Click(Sender: TObject);

var x,y,z,a,b,c,s: extended;

begin





:


: 2016-11-18; !; : 586 |


:

:

80% - .
==> ...

1567 - | 1426 -


© 2015-2024 lektsii.org - -

: 0.042 .