tw0784.pp 563 B

12345678910111213141516171819202122232425262728
  1. { %FAIL }
  2. {$R+}
  3. { should not compile if range check on }
  4. program BigRange;
  5. const
  6. Limit = 100000000; { Hundred millions }
  7. One = 1;
  8. var
  9. Huge: longint;
  10. begin
  11. Huge := Limit + One;
  12. writeln(One, ' is the lower bound');
  13. writeln(Limit, ' is the upper bound');
  14. if Limit in [One .. Limit] then
  15. writeln(Limit, ' is within the range')
  16. else
  17. writeln(Limit, ' is out of the range');
  18. if Huge in [One .. Limit] then
  19. writeln(Huge, ' is within the range')
  20. else
  21. writeln(Huge, ' is out of the range')
  22. end.