[fpc-pascal] DateToStr in arm does not work!
josepascual at almudi.com
Wed Jul 4 13:48:09 CEST 2007
> > If this program compiles and works fine:
> > program floattest;
> > uses sysutils;
> > var a,b:double;
> > begin
> > a:=0.5;
> > b:=0.3;
> > writeln(format('%5.3f',[a*b]));
> > end.
> > can I assume that either my compiler has been built with the right
> > options or I have a working fpu?
> > I'm asking because jose original test program fails here, while the
> > above program correctly prints out 0.150
> does the above work if you set a or be to a negative number? my
> softfloat crashes with writeln(negative number).
negative number problem is not in float operation but in format or strings
try this new example:
if (c < 0) then
// 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
perhaps, I think now, part of problem can be in something relative abs or
used by abs.
comment your results,
More information about the fpc-pascal