Ver Mensaje Individual
  #6  
Antiguo 12-04-2005
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
Si te contesto para hexadecimal me vas a preguntar para octal así que mejor te propongo esta:

Código Delphi [-]
function DecToBaseN(D, N: Integer): String;
const
  Digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';

begin
  if D > 0
    then Result := DecToBaseN(D div N, N) + Digits[(D mod N) + 1]
    else Result := '';
end;

que convierte de decimal a cualquier base (al menos hasta base 36)

// Saludos
Responder Con Cita