Search code examples
delphidelphi-7

Does Delphi 7 support the inline keyword?


procedure display;inline;
begin
  showmessage('sakthi');
end;

procedure TFrmInline.BtnDisplayClick(Sender: TObject);
begin
  display;
end;

In this program if i compile it shows the error that "declaration expected but inline found".


Solution

  • Delphi 7 has no support for the inline keyword and will not inline functions.

    The inline keyword was added in Delphi 2005: https://stackoverflow.com/a/8460108/