HomeDelphiDelphi Error – E2053 Syntax error in real number

Delphi Error – E2053 Syntax error in real number

Delphi Compiler Error

E2053 Syntax error in real number

Reason for the Error & Solution

This error message occurs if the compiler finds the beginning of a scale factor (an ‘E’ or ‘e’ character) in a number, but no digits follow it.

program Produce;
const
  SpeedOfLight = 3.0E 8;    (*<-- Error message here*)
begin
end.

In the example, we put a space after ‘3.0E’ – now for the compiler the number ends here, and it is incomplete.

program Solve;
const
  SpeedOfLight = 3.0E+8;
begin
end.

We could have just deleted the blank, but we put in a ‘+’ sign because it looks nicer.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Delphi Compiler Error X2421 Imported identifier ‘%s’ conflicts with ‘%s’ in ‘%s’ Reason for the Error & Solution This occurs...
Delphi Compiler Error X2367 Case of property accessor method %s.%s should be %s.%s Reason for the Error & Solution No...
Delphi Compiler Error X2269 Overriding virtual method ‘%s.%s’ has lower visibility (%s) than base class ‘%s’ (%s) Reason for the...