Here is a typical LPR (project) file.
program Project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, unit1
{ you can add units after this };
{$R *.res}
begin
RequireDerivedFormResource:=True;
Application.Initialize;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.
As you can see it starts with the keyword
program and has a
uses section which includes the bare minimum needed to run a GUI application.
It then runs code between the
begin and
end. keywords, which would be the equivalent of a main() function perhaps. The event loop is contained in the
Application object.