tb0233.pp 438 B

123456789101112131415161718192021
  1. { Old file: tbs0273.pp }
  2. { small array pushing to array of char procedure is wrong OK 0.99.13 (PFV) }
  3. Program CharArr;
  4. Var CharArray : Array[1..4] Of Char;
  5. S : String;
  6. Begin
  7. CharArray:='BUG?';
  8. S:=CharArray;
  9. WriteLn(S); { * This is O.K. * }
  10. WriteLn(CharArray); { * GENERAL PROTECTION FAULT. * }
  11. if CharArray<>'BUG?' then
  12. begin
  13. Writeln('Error comparing charaay to constant string');
  14. Halt(1);
  15. end;
  16. End.