{ BUG: No runtime checks are done for [sub]string assignments. }

Program Miklos1;

Var
  str: String ( 13 );
  i, j: Integer;

begin
  str:='1234567failed';
  str:='1234567OK';
  i:=8;
  j:=15;
  str:=str[i..j];   { yields junk which can result in a crash }
  str[i..j]:= '';   { wipes out one character }
  writeln ( str );
end.
