*** empty log message ***

This commit is contained in:
florian 2001-07-10 09:41:04 +00:00
parent ecd4fbace8
commit f34aaa82da
2 changed files with 39 additions and 0 deletions

33
tests/tbs/tb0364.pp Normal file
View File

@ -0,0 +1,33 @@
uses
sysutils;
{ comment by submitter:
The following statement (which works in Delphi)
result:=Format('%10.n', [ival*1.0]);
generated an unhandled exception (and said: Missing argument in format "").
Checking the Delphi documentation, it agrees with the fpc documentation
(units.pdf), that a dot should be followed by a <prec> (but Delphi does
not appear to explicitly state that prec should be an integer).
It appears that Delphi is treating this like %10.0n, although it is
potentially undefined behaviour. The fpc documentation indicates I
should get an EConversionError exception if there are problems.
(Actually the documentation may be inconsistent, since it also says
I may get an EConvertError exception.)
If I change the format string to %10.0n, the program runs OK using
fpc, however, my thousand separators do not appear.
}
var
s : string;
ival : integer;
begin
ival:=1234;
s:=Format('%10.n', [ival*1.0]);
if s<>' 1.234' then
begin
writeln('Problem with Format');
halt(1);
end;
end.

6
tests/tbs/tb0365.pp Normal file
View File

@ -0,0 +1,6 @@
var
t : textfile;
begin
assign(t,'test');
end.