Ver Mensaje Individual
  #9  
Antiguo 12-03-2008
Avatar de ixMike
ixMike ixMike is offline
Miembro
 
Registrado: feb 2004
Posts: 1.151
Reputación: 22
ixMike Va por buen camino
¡Será posible! Deberías haber empezado un poco antes, ¿no?

A ver qué te parece esto (no sé si funciona correctamente):

Código Delphi [-]
Function RealToBin(R: Real): String;
type
  TBReal = record
    B1, B2, B3, B4, B5, B6: Byte; //una estructura que ocupa lo mismo que un Real y puedes accederla byte a byte
   end;
  PBReal = ^TBReal; //Puntero a ese tipo
var
  V: PBReal;
  S: String;
begin
  V:=@R;
  S:=IntToBin(V^.B1, 8) + IntToBin(V^.B2, 8) + IntToBin(V^.B3, 8) + 
     IntToBin(V^.B4, 8) + IntToBin(V^.B5, 8) + IntToBin(V^.B6, 8);
  Result:=S;
end;


Espero que te sirva (mira a ver si puedes hacerlo tú con un puntero a una matriz, en vez de a una estructura ).

Salu2.
Responder Con Cita