(* Collection of code snippets by Arne Vajhøj *)
(* (from articles on eksperten.dk / vajhoej.dk written sometime between 2004 and now) *)
program smpl(input,output);

%include 'gentypes.pas'
%include 'recs.pas'

var
   fc : file of customer;
   c : customer;

begin
   writeln('Pascal - customers:');
   open(fc, 'customer.isq', old, organization := indexed, access_method := keyed);
   resetk(fc, 0);
   while not eof(fc) do begin
      c := fc^;
      writeln(trim(c.name), ' : ', trim(c.address));
      get(fc);
   end;
   close(fc);
end.
