tw2306.pp 616 B

123456789101112131415161718192021222324252627282930313233
  1. { Source provided for Free Pascal Bug Report 2306 }
  2. { Submitted by "Sergey Kosarevsky" on 2003-01-03 }
  3. { e-mail: [email protected] }
  4. {$H-}
  5. Const LONG_STR_SIZE=4096;
  6. Type tLongStr=Object // try to change this
  7. // to Record
  8. LStr:Array[0..LONG_STR_SIZE] Of Char;
  9. LLength:Longint;
  10. End;
  11. Operator := (S:String) R:tLongStr;
  12. Begin
  13. R.LLength:=Length(S);
  14. Move(S[1],R.LStr[1],Length(S));
  15. End;
  16. Var T:tLongStr;
  17. Begin
  18. T:='Hello';
  19. if (T.LLength<>5) or
  20. (T.LStr[1]<>'H') or
  21. (T.LStr[5]<>'o') then
  22. begin
  23. writeln('Error!');
  24. halt(1);
  25. end;
  26. End.