Sometimes I see this message when I try to compile Lazarus project.
Right now, I'm trying to make a pas2js project.
program project2;
{$mode objfpc}
uses
JS, Classes, SysUtils, Web, p2_unit1;
begin
with TForm1.Create(nil) do
Button1Click(nil);
end.
// unit having a form
unit p2_unit1;
{$mode ObjFPC}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls;
type
{ TForm1 }
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage('Hello, world');
end;
end.
I could make following run --- the browser's console displayed 'hello, world'.
program project2;
{$mode objfpc}
uses
JS, Classes, SysUtils, Web, p2_unit1;
begin
Writeln ('hello, world');
end.