SRL Archive - Bugs

FloatToStr, VERY small bug


MylesMadness

2010-01-30 17:37:29

FloatToStr returns unneeded zeros at the end of the string.

Writeln(FloatToStr(1.21235));

1.212350000000

Wanted

2010-01-30 17:42:20

From: MylesMadness
FloatToStr returns unneeded zeros at the end of the string.

Writeln(FloatToStr(1.21235));

1.212350000000


Edit: Something like this should work then

function FloatToStrEx(E: Extended): string;
begin
Result := (IntToStr(Floor(E)) + Copy(FloatToStr(DecRet(E)), 2, 3));
end;

MylesMadness

2010-01-30 17:45:27

Scar doesn't do this…

Wanted

2010-01-30 17:46:48

Ugh, stupid 'Todays post'… it just says 'Bugs' so I was assuming this was in SRL public SVN.

2nd time I've done this :-/

That should be what you need though.

MylesMadness

2010-01-30 17:51:39

Another bug is the bug tracker wont let me sign up :p

edit: NVM the emails just didn't some right away

mastaraymond

2010-01-31 16:31:50

Yeah, it's pretty annoying indeed. It's however a bug in PascalScript :( ->
http://forums.remobjects.com/default.aspx?g=posts&t=420535