program fjf193b(Output);
(* FLAG --extended-pascal *)

var
  a : bindable Text;
  b : BindingType;
  s : string (42);
begin
  b := Binding (a);
  b.Name := 'test.dat';
  Bind (a, b);
  Rewrite (a);
  Writeln (a, '{ should write OK }');
  Reset (a);
  Readln (a, s);
  Writeln (s [Index (s, 'OK') .. Index (s, 'OK')+1 ] )
end.
