![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#4
|
|||
|
|||
|
Mas opciones:
Código:
function BinaryStr(B: Byte): String;
var
I: Integer;
begin
SetLength(Result,8);
for I := 1 to 8 do begin
Result[i]:= PChar('01')[(B SHR (8-I)) AND 1];
end{for};
end;
Código:
function BinaryStr(B: Byte): String;
var
I : Integer;
Ptr: PChar;
begin
SetLength(Result,8);
Ptr:= PChar(Result);
for I:= 7 downto 0 do begin
Ptr^:= PChar('01')[(B SHR I) AND 1];
Inc(Ptr);
end{for};
end;:
|
|
|
|