Ver Mensaje Individual
  #4  
Antiguo 06-10-2008
Avatar de donald shimoda
donald shimoda donald shimoda is offline
Miembro
 
Registrado: jul 2008
Ubicación: Argentino en Santa Cruz de la Sierra
Posts: 1.083
Reputación: 19
donald shimoda Va por buen camino
Cita:
Empezado por egostar Ver Mensaje
Hola

Tal vez te puede servir esto

http://www.merlyn.demon.co.uk/programs/hexfloat.pas

Salud OS
Por cierto, se resolvió demasiado fácil (amo pascal). Por si a alguien le sirve:

Código Delphi [-]
function HexToSingle(const hex:  string):  Single;
var
  d      :  Single;
  Overlay:  Longword absolute d;
begin
  if (Length(hex)<>8) then
    raise Exception.Create('Funcion hextosingle largo de string de entrada incorrecto');
  Overlay := StrToInt('$' + Copy(hex, 1, 8));
  result := d
end;

function Singletohex(const d: single): string;
var
  Overlay:  longword absolute d;
begin
  result := IntToHex(Overlay, 8)
end;
__________________
Donald Shimoda [Team RO] - Blogs: Remobjects Pascal
Responder Con Cita