Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 19-11-2014
Avatar de nlsgarcia
[nlsgarcia] nlsgarcia is offline
Miembro Premium
 
Registrado: feb 2007
Ubicación: Caracas, Venezuela
Posts: 2.206
Poder: 23
nlsgarcia Tiene un aura espectacularnlsgarcia Tiene un aura espectacular
elmago00,

Cita:
Empezado por elmago00
...¿Cómo convertir un Integer a Hexadecimal?...El valor Integer que utilizo es 256312456892254...Como hago para generar el mismo hexadecimal 082A6513426598224500000000000000...


Revisa este código:
Código Delphi [-]
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, StrUtils, UBigIntsV4;

type
  TForm1 = class(TForm)
    Edit1: TEdit;
    Edit2: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Button1: TButton;
    Button2: TButton;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

// Convertir Decimal a Hexadecimal
procedure TForm1.Button1Click(Sender: TObject);
var
   Hex : TInteger;
begin
   Hex := TInteger.Create(0);
   Hex.Assign(Edit1.Text);
   Edit2.Text := Hex.ConvertToHexString;
   Hex.Free;
end;

// Convertir Hexadecimal a Decimal
procedure TForm1.Button2Click(Sender: TObject);
var
   Dec : TInteger;
begin
   Dec := TInteger.Create(0);
   Dec.AssignHex(Edit1.Text);
   Edit2.Text := Dec.ConvertToDecimalString(False);
   Dec.Free;
end;

end.
El código anterior en Delphi 2010 bajo Windows 7 Professional x32, convierte números de Decimal a Hexadecimal y viceversa por medio de DFF Library, como se puede ver en la siguiente imagen:



Espero sea útil

Nelson.
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Convertir Binario a Hexadecimal. JoseFco ASM y Microcontroladores 21 30-10-2008 22:43:31
convertir int o char a hexadecimal. bactering C++ Builder 2 05-10-2008 21:18:45
¿Cómo convertir de word a integer? bluegene Varios 16 19-03-2007 22:31:18
String Hexadecimal '000CB2' a Cardinal o Integer onlytk Varios 2 06-11-2005 17:24:38
Como Convertir un dato Integer ó Float a String en FireBird???? AGAG4 Firebird e Interbase 8 04-12-2004 02:59:47


La franja horaria es GMT +2. Ahora son las 20:17:57.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi