.


:




:

































 

 

 

 


,

, (). Delphi . , , .

Delphi . Ÿ () , , . .

- begin / end. implementation :

var
Form1: TForm1;

, , . , (Form1) !

Delphi:

var _: _;

var - . , Delphi. , , :

var A, B, C: Integer;

, var :

var A, B: Integer;
C, D: String;

. , : 3.1415 ' ', . , const, , . :

const pi = 3.1415;
ZnakPi: String = ' ';

, Pi Delphi, Delphi 3,1415... , Pi Real .


, Delphi. .

, :

' ' , :
' '' - ' , . . , .
- String. String 2 . , String , : String[50]. Delphi .
Char : 'a'. , , , ( #13), ( #10). ( ANSI), #. , #0.
, - . , 0 (#0). PChar.

.
.

Integer -2147483648.. +2147483647
Cardinal 0.. 4294967295
Shortint -128.. +127
Smallint -32768.. +32767
Int64 -263.. +263-1
Byte 0.. +255
Word 0.. +65535
Delphi Integer. , .

 

, . e ( E), , , 10 : 5e25 - .
. , , 0.

Real 5*10-324.. 1.7*10308
Real48 2.9*10-39.. 1.7*1038
Singl 1.5*10-45.. 3.4*1038
Double 5*10-324.. 1.7*10308
Extended 3.6*10-4951.. 1.1*104932-1
Comp -263.. +263-1
Currency 922337203685477.5807
Delphi Real. Double, . , Currency(), .

 

Boolean, : True () False (). True > False.

, , , , , . , .
! Windows- - , Text Caption. , , Label, Edit Caption, . , Delphi , , . , ( ):

var A, B, C: Integer;
begin
A:= 5;
B:= 10;
C:= A+B;
Label1.Caption:= C;
end;

, Caption String, - Integer. , C . IntToStr. "", , :

Label1.Caption:= IntToStr(C);

, 15, . . Edit. Text . Edit, Label Button, . Edit1 Edit2 . , Button1. Delphi , begin end. :

procedure TForm1.Button1Click(Sender: TObject);
var A, B, C: Integer; //
begin
// :
A:= Edit1.Text;
B:= Edit2.Text;
C:= A+B;
Label1.Caption:= IntToStr(C);
//
end;

Delphi - A B Integer, Text - String. StrToInt, - . A B :

A:= StrToInt(Edit1.Text);
B:= StrToInt(Edit2.Text);

A, B, C . :

Label1.Caption:= IntToStr (StrToInt (Edit1.Text)+

StrToInt (Edit2.Text));

, c (Float ing .) , Real. - FloatToStr, - StrToFloat.
, Delphi Real, "" . . , Delphi Delphi.

 

 

1. , 9/5 32(: Real, ). :

2. , .

 



<== | ==>
 |
:


: 2016-12-29; !; : 325 |


:

:

, ,
==> ...

1506 - | 1429 -


© 2015-2024 lektsii.org - -

: 0.016 .