function IndexOfArrayItem(TheArray :
Array of String ;Item :
String ):Integer;
overload;
function IndexOfArrayItem(TheArray :
Array of Byte ;Item : Byte ):Integer;
overload;
function IndexOfArrayItem(TheArray :
Array of Integer ;Item : Integer ):Integer;
overload;
function IndexOfArrayItem(TheArray :
Array of Char ;Item : Char ):Integer;
overload;
function IndexOfArrayItem(TheArray :
Array of Currency;Item : Currency):Integer;
overload;
function IndexOfArrayItem(TheArray :
Array of Double ;Item : Double ):Integer;
overload;
// diese Funktion benutzt eine der oben deklarierten:
function EnglishMonthToInt(Month :
String):Integer;
implementation
function IndexOfArrayItem(TheArray :
Array of String;Item :
String):Integer;
begin
Result := Low(TheArray);
while (Result <= High(TheArray))
and (TheArray[Result] <> Item)
do Inc(Result);
if Result > High(TheArray)
then Result := -1;
end;
function IndexOfArrayItem(TheArray :
Array of Byte;Item : Byte):Integer;
begin
Result := Low(TheArray);
while (Result <= High(TheArray))
and (TheArray[Result] <> Item)
do Inc(Result);
if Result > High(TheArray)
then Result := -1;
end;
function IndexOfArrayItem(TheArray :
Array of Integer;Item : Integer):Integer;
begin
Result := Low(TheArray);
while (Result <= High(TheArray))
and (TheArray[Result] <> Item)
do Inc(Result);
if Result > High(TheArray)
then Result := -1;
end;
function IndexOfArrayItem(TheArray :
Array of Char;Item : Char):Integer;
begin
Result := Low(TheArray);
while (Result <= High(TheArray))
and (TheArray[Result] <> Item)
do Inc(Result);
if Result > High(TheArray)
then Result := -1;
end;
function IndexOfArrayItem(TheArray :
Array of Currency;Item : Currency):Integer;
begin
Result := Low(TheArray);
while (Result <= High(TheArray))
and (TheArray[Result] <> Item)
do Inc(Result);
if Result > High(TheArray)
then Result := -1;
end;
function IndexOfArrayItem(TheArray :
Array of Double;Item : Double):Integer;
begin
Result := Low(TheArray);
while (Result <= High(TheArray))
and (TheArray[Result] <> Item)
do Inc(Result);
if Result > High(TheArray)
then Result := -1;
end;
function EnglishMonthToInt(Month :
String):Integer;
const
MonthArray :
Array[1..12]
of String
= ('
JAN','
FEB','
MAR','
APR','
MAY','
JUN','
JUL','
AUG','
SEP','
OCT','
NOV','
DEC');
begin
Result IndexOfArrayItem(MonthArray,Month);
end;