PROGRAM TEST(INPUT,OUTPUT);

const
  MAX_LINE_LENGTH = 140;
type
  LINESTR = lstring(MAX_LINE_LENGTH);
var
  INFILE   :TEXT;
  TABLINE,NOTABLINE   :lstring(MAX_LINE_LENGTH);
  X	  :char;
  I	  :integer;

PROCEDURE EXPAND_TABS(var TABLINE,NOTABLINE:lstring); EXTERN;

BEGIN (*test*)
  assign(INFILE,'TEST.TXT');
  reset(INFILE);
  while not eof(INFILE) do
  begin
    readln(INFILE,TABLINE);
    writeln('Line length= ',ord(TABLINE[0]));
    writeln(TABLINE);
    for I:= 1 to ord(TABLINE[0]) do
    begin
      if ord(TABLINE[I])=9 then write('@')
      else write(TABLINE[I]);
    end;
    writeln;
    writeln('====== CALL EXPAND_TABS ======');
    EXPAND_TABS(TABLINE,NOTABLINE);
    writeln('Line length= ',ord(NOTABLINE[0]));
    for I:= 1 to ord(NOTABLINE[0]) do
    begin
      if ord(NOTABLINE[I])=9 then write('@')
      else write(NOTABLINE[I]);
    end;
    writeln;
    writeln('---------- Hit ENTER to continue: ');
    read(X);
  end;
end.(*TEST*)
