[fpc-pascal] DateToStr in arm does not work!

Henry Vermaak henry.vermaak at gmail.com
Wed Jul 4 13:46:03 CEST 2007


On 04/07/07, josepascual <josepascual at almudi.com> wrote:
>
> negative number problem is not in float operation but in format or strings
> subsystem.
>
> try this new example:
>
> program floattest;
>
> uses sysutils;
> var a,b,c,d,e:double;
>
> begin
> a:=0.5;
> b:=0.3;
> writeln(format('%5.3f',[a*b]));
> a:=-0.5;
> c:=a*b;
> d:=a*c;
> writeln(format('%5.3f',[d]));
> if (c < 0) then
> begin
> //  e := abs(c); seems not to work! please remove // and try it
>   e := -1*c; // remove or comment if you use abs in above line
>   writeln('-'+format('%5.3f',[e]));
> end;
> end.
>
> perhaps, I think now, part of problem can be in something relative abs or
> used by abs.
>
> comment your results,
>

i've reported this a while ago.  i added a back trace the other day:

http://www.freepascal.org/mantis/view.php?id=8737

> regards
>
> Jose Pascual
>

henry



More information about the fpc-pascal mailing list