A Pascal program generally follows this structure:
program ProgramName;
uses
{Units}; // e.g., crt, sysutils
const
{Constants}; // e.g., MaxValue = 100;
type
{Type Definitions}; // e.g., String20 = string[20];
var
{Variable Declarations}; // e.g., counter : integer;
procedure ProcedureName;
begin
{Procedure Body}
end;
function FunctionName : ReturnType;
begin
{Function Body}
FunctionName := ReturnValue;
end;
begin
{Main Program Body}
end.