Sida 1 av 2
MITT FÖRSTA PROGRAM
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads, {$ENDIF}{$ENDIF}
Classes
{ you can add units after this };
{$IFDEF WINDOWS}{$R project1.rc}{$ENDIF}
begin
WriteLn('Hello world!');
ReadLn;
end.
Sida 2 av 2
MIN FÖRSTA APPLIKATION
unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm) Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ private declarations } public
{ public declarations } end;
var
Form1: TForm1;
implementation { TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage('Hello world');
end;
initialization {$I unit1.lrs}
end.