tb0211.pp 563 B

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