summaryrefslogtreecommitdiff
path: root/tests/webtbs/tw32115.pp
blob: 2c2dd74a9fc7220b8e9a7b37e6fc23c8043171ce (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
{$mode objfpc}
program Project1;

function CalcSmth(const AValue: LongInt): Integer;
begin
  case AValue of
    -9999999..-1000000: Result := 2;
      -999999..-100000: Result := 7;
        -99999..-10000: Result := 5;
          -9999..-1000: Result := 6;
            -999..-100: Result := 3;
              -99..-10: Result := 2;
                -9..-1: Result := 3;
                  0..9: Result := 5;
                10..99: Result := 2;
              100..999: Result := 3;
            1000..9999: Result := 1;
          10000..99999: Result := 5;
        100000..999999: Result := 8;
      1000000..9999999: Result := 6;
  end;
end;

begin
  CalcSmth(0);
end.