tbs0250.pp 463 B

1234567891011121314151617181920212223242526272829
  1. program testme;
  2. uses erroru;
  3. // Removing this switch removes the bug !!
  4. {$H+}
  5. var A : String;
  6. P : PChar;
  7. I : longint;
  8. begin
  9. P := 'Some sample testchar';
  10. A := Ansistring(P);
  11. Writeln ('A : ',A);
  12. for I:=1 to length(A)-1 do
  13. begin
  14. A:='Some small test';
  15. A:=A+' ansistring';
  16. Writeln ('A : ',A);
  17. If A<>'' then
  18. Writeln ('All is fine')
  19. else
  20. begin
  21. writeln ('Oh-oh!');
  22. error;
  23. end;
  24. end;
  25. end.