mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 11:39:24 +02:00
* fixed test for all 64 bit and some 32 bit platforms (1.0 is parsed
as single -> 1.0*int64 is also a single normally, but on 32 bit platforms converting a 64 bit int to float usually requires a helper, and this helper always returns a double) git-svn-id: trunk@10173 -
This commit is contained in:
parent
5e389a00d0
commit
bbfa1c76fe
@ -12,14 +12,14 @@ procedure p;
|
|||||||
begin
|
begin
|
||||||
//This goes wrong, notice the AStr input and output
|
//This goes wrong, notice the AStr input and output
|
||||||
AValue:=1234567890;
|
AValue:=1234567890;
|
||||||
AStr := Format('%0.n',[1.0*AValue]); //1.234.567.890
|
AStr := Format('%0.n',[double(1.0)*AValue]); //1.234.567.890
|
||||||
AStr := Format('<font color="#ff0000">%s</font>',[AStr]);
|
AStr := Format('<font color="#ff0000">%s</font>',[AStr]);
|
||||||
Writeln('Wrong:' +AStr); //Wrong: <font color="#ff0000"></font>????
|
Writeln('Wrong:' +AStr); //Wrong: <font color="#ff0000"></font>????
|
||||||
if AStr<>'<font color="#ff0000">1,234,567,890</font>' then
|
if AStr<>'<font color="#ff0000">1,234,567,890</font>' then
|
||||||
err:=true;
|
err:=true;
|
||||||
//This is Ok, notice the changed output AText
|
//This is Ok, notice the changed output AText
|
||||||
AValue:=2134567890;
|
AValue:=2134567890;
|
||||||
AStr := Format('%0.n',[1.0*AValue]); //2.134.567.890
|
AStr := Format('%0.n',[double(1.0)*AValue]); //2.134.567.890
|
||||||
AText := Format('<font color="#ff0000">%s</font>',[AStr]);
|
AText := Format('<font color="#ff0000">%s</font>',[AStr]);
|
||||||
Writeln('Ok:' +AText); //Ok 2.134.567.890
|
Writeln('Ok:' +AText); //Ok 2.134.567.890
|
||||||
if Atext<>'<font color="#ff0000">2,134,567,890</font>' then
|
if Atext<>'<font color="#ff0000">2,134,567,890</font>' then
|
||||||
|
Loading…
Reference in New Issue
Block a user