Home > Back-end >  Urgent ask Dephi7 local variables
Urgent ask Dephi7 local variables

Time:09-25

I would like to add some floating-point local variables here
Procedure TForm3. Button1Click (Sender: TObject);
Var
firstnumber, secondnumber, thirdnumber fivenumber, sixnumber, sevennumber: Float;
The begin
The end;
But after defined operating problems, the problem prompt appear in the underlined part,
Undeclared identifier: 'Float'

What reason is the great god, please help me have a look, ah, ask,,

CodePudding user response:

There is no float, use double

CodePudding user response:

Delphi floating-point, not float but single or double

CodePudding user response:

Real number:
Real 5.0 x 10-324.. 1.7 x 10308
Real48 2.9 x 10-39.. 1.7 x 1038
Single 1.5 x 10-45.. 3.4 x 1038
Double 5.0 x 10-324.. 1.7 x 10308
Extended 3.6 x 10-4951.. 1.1 x 104932
Currency - 922337203685477.5808.. 922337203685477.5807

The floating point number, corresponding Double is better,
 var 
Firstnumber, secondnumber, thirdnumber fivenumber sixnumber, sevennumber: Double;

CodePudding user response:

Delphi floating-point, not float but single or double
  • Related