Delphi – E2007 Constant or type identifier expected

When the compiler expects a type, but instead finds a symbol that is neither a constant (a constant might start a subrange type) nor a type identifier, this error message appears.

program Produce;
var
  c : ExceptionClass; (*ExceptionClass is a variable in System*)
begin
end.

ExceptionClass is a variable, not a type, in this case.

program Solve;
program Produce;
var
  c : Exception; (*Exception is a type in SysUtils*)
begin
end.

Make certain that you specify a type. Perhaps the identifier is misspelt or obscured by another identifier, such as one from another unit.