Show: Delphi C++
Display Preferences

E2003 Undeclared identifier '%s' (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Error and Warning Messages (Delphi)

The compiler could not find the given identifier - most likely it has been misspelled either at the point of declaration or the point of use. It might be from another unit that has not mentioned a uses clause.


program Produce;
var
  Counter: Integer;
begin
  Count := 0;
  Inc(Count);
  Writeln(Count);
end.

In the example, the variable has been declared as "Counter", but used as "Count". The solution is to either change the declaration or the places where the variable is used.


program Solve;
var
  Count: Integer;
begin
  Count := 0;
  Inc(Count);
  Writeln(Count);
end.

In the example we have chosen to change the declaration - that was less work.

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance