twrstr3.pp 352 B

123456789101112131415161718192021
  1. { from GPC test suite }
  2. Program fjf7;
  3. Var
  4. S: String [ 80 ];
  5. astr: ansistring;
  6. begin
  7. WriteStr ( astr, '' : 5, 'OKabcdf' : 7 );
  8. if (length ( astr ) <> 5 + 7) or
  9. (copy(astr,6,2) <> 'OK') then
  10. halt(1);
  11. WriteStr ( S, '' : 5, 'OKabcdf' : 7 );
  12. if length ( S ) = 5 + 7 then
  13. halt(ord(copy(S,6,2) <> 'OK'))
  14. else
  15. halt(1);
  16. end.