Unit Foo;

Interface

Implementation

Var
  Bar: Text;

begin
  Assign ( Bar, 'test.dat' );
  rewrite ( Bar );
  writeln ( Bar, 'OK' );
  close ( Bar );
end.


Program FooBar;

uses
  Foo;

Var
  Baz: Text;
  S: String ( 2 );

begin
  Assign ( Baz, 'test.dat' );
  reset ( Baz );
  readln ( Baz, S );
  writeln ( S );
  close ( Baz );
end.
