summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw0784.pp
blob: f1fe39651141996c0f95fda223570140db6d1f55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{$R-}
{ should compile if no range check on }
program BigRange;

const
  Limit   = 100000000; { Hundred millions }
  One     =         1;

var
  Huge: longint;

begin
    Huge := Limit + One;

    writeln(One, ' is the lower bound');
    writeln(Limit, ' is the upper bound');

    if Limit in [One .. Limit] then
      writeln(Limit, ' is within the range')
    else
      writeln(Limit, ' is out of the range');

    if Huge in [One .. Limit] then
      writeln(Huge, ' is within the range')
    else
      writeln(Huge, ' is out of the range')
end.