bug0250.pp 411 B

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