That is better than mineOriginally Posted by JSoftware
[pascal]
function SingleToRaw(s: Single): string;
type
TFloatToByte = packed record
case Byte of
0: (s: Single);
1: (a:array[0..4] of Byte);
end;
var f: TFloatToByte;
i: Integer;
begin
f.s := s;
for I := 3 downto 0 do
Result:= Result+ Char(f.a[I]);
end;
[/pascal]
Bookmarks