program tstsupper;

%include 'ex:[22,320]string.pkg';

type
  typ1 = packed array [1..15] of char;
  typ0 = packed array [0..15] of char;
  ch3  = packed array [1..3]  of char;

var
  typ1string,string : typ1;
  typ0string : typ0;
  end_check : ch3;
  len,i : integer;

begin
  writeln;
  writeln('begin type1 Supper test.  Type "end" to quit.');
  writeln;
  repeat
    write('enter string : ');
    Sclear(typ1string);
    Sread(INPUT,typ1string);
    for i:=1 to 3 do
      end_check[i]:=typ1string[i];
    if end_check <> 'end'
      then begin
           supper(typ1string);
           writeln(typ1string);
           end
      else writeln('end of type1 Supper test.');
    until end_check = 'end'; 
  writeln;
  writeln('begin type0 Supper test.  Type "end" to quit.');
  writeln;
  repeat
    write('enter string : ');
    Sclear(typ0string);
    Sclear(string);
    Sread(INPUT,typ0string);
    len := slen(typ0string);
    for i := 1 to 3 do
      end_check[i] := typ0string[i];
    if end_check <> 'end'
      then begin
           Supper(typ0string);
           for i := 1 to len do
             string[i] := typ0string[i];
           writeln(string);
           end
      else writeln('end of type0 supper test.'); 
    until end_check = 'end';
  writeln;
  writeln('end of Supper test.')  
end.
