Ver Mensaje Individual
  #2  
Antiguo 16-05-2007
Avatar de roman
roman roman is offline
Moderador
 
Registrado: may 2003
Ubicación: Ciudad de México
Posts: 20.269
Reputación: 10
roman Es un diamante en brutoroman Es un diamante en brutoroman Es un diamante en bruto
¡Qué cosa más rara! Pero si he entendido bien, esta función te puede servir:

Código Delphi [-]
function NumeroADigitos(N:Integer): String;
const
  Digitos: array[0..9] of String = (
    'cero', 'uno', 'dos', 'tres', 'cuatro',
    'cinco', 'seis', 'siete', 'ocho','nueve'
  );

var
  S: String;
  D, I: Integer;

begin
  S := IntToStr(N);
  for I := 1 to Length(S) do
  begin
    D := StrToInt(S[i]);
    Result := Result + Digitos[D] + ' ';
  end;

  Result := Trim(Result);
end;

// Saludos
Responder Con Cita