program run_example(input,output);
type
   string = varying[2**16-1] of char;
   atString = @string;
var
   numOdd,numEven: [external] integer;
   even_lines, odd_lines: [external,volatile] integer;

procedure dump(var what: [volatile] integer; num: integer);
var
   i,it: integer;
begin
   it := iaddress(what);
   for i := 1 to num do begin
      writeln(it::atString^);
      it := it+it::atString^.length+2;
      end;
   end;

begin
   writeln;
   write('Press RETURN to see the odd numbered lines you typed'); readln;
   writeln;
   dump(odd_lines,numodd);
   writeln; 
   write('And the even lines'); readln;
   writeln;
   dump(even_lines,numeven);
   writeln; 
   end.
