tbs0211.pp 502 B

1234567891011121314151617181920212223242526272829
  1. var
  2. a,b : boolean;
  3. c : byte;
  4. i : longint;
  5. procedure Error;
  6. begin
  7. Writeln('Error in bug0211');
  8. Halt(1);
  9. end;
  10. begin
  11. c:=5;
  12. a:=boolean(c);
  13. if a and not a then
  14. Begin
  15. Writeln('FPC is crazy !!');
  16. Error;
  17. End;
  18. i:=256;
  19. a:=boolean(i);
  20. { the value here is less trivial }
  21. { BP returns false here !! }
  22. { the problem is the converting wordbool to boolean }
  23. { if wordbool is 256 should not convert true to false !! }
  24. Writeln('boolean(256) =',a);
  25. end.