Quote Originally Posted by JSoftware
[pascal]type
TStrFloat = packed array[1..4] of char;

function IntToRaw(I: Integer): String;
begin
result := TStrFloat(I);
end;

SingleToRaw(SI: Single): String;
begin
result := TStrFloat(SI);
end;[/pascal]
That is better than mine

[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]