summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw15668.pp
blob: 8ba9426233d90ff2657c99d70c782bea671e5b63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{ %OPT=-Ooloopunroll -O2 -S2 -Cr }
const
  StrArray :array[0..1] of string = ('s1','s2');

function FindStr(const s :string) :Integer;
var
  i :Integer;
begin
  for i := High(StrArray) downto 0 do
    if StrArray[i] = s then Exit(i);
  Result := -1;
end;

begin
  FindStr('s1');
end.