module DemoMod3;

type
  FooType = Integer;

var
  Foo : FooType;

procedure SetFoo (f : FooType);
begin
  Foo := f
end;

function GetFoo : FooType;
begin
  GetFoo := Foo;
end;

end.

program ModDemo3 (Output);

{ Manually do the "import" from DemoMod3 }
type
  FooType = Integer;

procedure SetFoo (f : FooType); external;
function  GetFoo : FooType;     external;

begin
  SetFoo (999);
  WriteLn (GetFoo)
end.
