Ver Mensaje Individual
  #12  
Antiguo 22-03-2009
jconnor82 jconnor82 is offline
Miembro
 
Registrado: feb 2008
Posts: 22
Reputación: 0
jconnor82 Va por buen camino
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;
Responder Con Cita