Your code does not even compile on
my 2.6.4 installation (no Lazarus).

  Where does the currtostr function come from?
Apparently from sysutils unit.
How is it 'included' without any uses clause?
I found no option that automatic 
add unit sysutils.

  Could you give us a source and a compilation command line
that does not require Lazarus use?


Pierre Muller

> -----Message d'origine-----
> De : fpc-pascal-boun...@lists.freepascal.org [mailto:fpc-pascal-
> boun...@lists.freepascal.org] De la part de LacaK
> Envoyé : mardi 29 avril 2014 10:23
> À : FPC-Pascal users discussions
> Objet : [fpc-pascal] Inconsistent results currency - extended ?
> 
> Hi,
> I catch strange behavior, which I can not understand ;-)
> 
> I have 2 PC on both I have installed Lazarus 1.2.2 + FPC 2.6.4
> (official
> release)
> 
> 1st PC has Windows 98 2nd PC has Windows Vista (32 bit)
> 
> I have this program:
> =============================
> var
>   c: currency;
>   e: extended;
> begin
>   c:=-92233720368547;
>   e:=c;
>   writeln('CW=', Get8087cw(), ' currency=', c, ' extended=', e, '
> string=', currtostr(c));
> =============================
> 
> When I compile on 1st PC (Win98) and run it on 1st or 2nd PC I get this
> result:
> CW=4978 currency=-9.223372036854699520E+13
> extended=-9.2233720368546995E+0013 string=-92233720368546,9952
> 
> When I compile on 2nd PC (Win Vista) and run on 1st or 2nd PC I get
> (expected) result:
> CW=4978 currency=-9.223372036854700000E+13
> extended=-9.2233720368547000E+0013 string=-92233720368547
> 
> How is it possible?
> Is compiled code somehow affected by platform on which is compilation
> performed?
> 
> Thanks
> -Laco.
> 
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to