Hola a todos...
Segun entendi, lo que quiere es obtener el primer numero del arreglo q empieze con
d
Código Delphi
[-]function Choose(D: Integer; Values: array of Integer): Integer;
var
I: Integer;
sD, sValue: string;
begin
Result := -1;
sD := IntToStr(D);
for I := 0 to High(Values) do
begin
sValue := IntToStr(Values[i]);
if Pos(sD, sValue) = 1 then
begin
Result := Values[i];
Break;
end;
end;
end;