You've already forked lazarus-ccr
Parser : map xsd:decimal to Currency.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3052 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -143,13 +143,19 @@ function wst_FormatFloat(
|
|||||||
var
|
var
|
||||||
s, frmt : string;
|
s, frmt : string;
|
||||||
prcsn : Integer;
|
prcsn : Integer;
|
||||||
|
decimal : Boolean;
|
||||||
{$IFNDEF HAS_FORMAT_SETTINGS}
|
{$IFNDEF HAS_FORMAT_SETTINGS}
|
||||||
i : PtrInt;
|
i : PtrInt;
|
||||||
{$ENDIF HAS_FORMAT_SETTINGS}
|
{$ENDIF HAS_FORMAT_SETTINGS}
|
||||||
begin
|
begin
|
||||||
|
decimal := False;
|
||||||
case GetTypeData(ATypeInfo)^.FloatType Of
|
case GetTypeData(ATypeInfo)^.FloatType Of
|
||||||
|
ftCurr :
|
||||||
|
begin
|
||||||
|
decimal := True;
|
||||||
|
frmt := '##############0.####';//15.4
|
||||||
|
end;
|
||||||
ftSingle,
|
ftSingle,
|
||||||
ftCurr,
|
|
||||||
ftComp : prcsn := 7;
|
ftComp : prcsn := 7;
|
||||||
ftDouble,
|
ftDouble,
|
||||||
ftExtended :
|
ftExtended :
|
||||||
@ -163,6 +169,7 @@ begin
|
|||||||
else
|
else
|
||||||
prcsn := 7;
|
prcsn := 7;
|
||||||
end;
|
end;
|
||||||
|
if not decimal then
|
||||||
frmt := '#.' + StringOfChar('#',prcsn) + 'E-0';
|
frmt := '#.' + StringOfChar('#',prcsn) + 'E-0';
|
||||||
{$IFDEF HAS_FORMAT_SETTINGS}
|
{$IFDEF HAS_FORMAT_SETTINGS}
|
||||||
s := FormatFloat(frmt,AData,wst_FormatSettings);
|
s := FormatFloat(frmt,AData,wst_FormatSettings);
|
||||||
|
@ -277,7 +277,7 @@ const
|
|||||||
('Qword', 'TComplexInt64UContentRemotable', 'unsignedLong'),
|
('Qword', 'TComplexInt64UContentRemotable', 'unsignedLong'),
|
||||||
('Single', 'TComplexFloatSingleContentRemotable', 'float'),
|
('Single', 'TComplexFloatSingleContentRemotable', 'float'),
|
||||||
('Double', 'TComplexFloatDoubleContentRemotable', 'double'),
|
('Double', 'TComplexFloatDoubleContentRemotable', 'double'),
|
||||||
('Extended', 'TComplexFloatExtendedContentRemotable', 'decimal')
|
('Extended', 'TComplexFloatExtendedContentRemotable', 'double')
|
||||||
);
|
);
|
||||||
BOXED_TYPES_COUNT = 2;
|
BOXED_TYPES_COUNT = 2;
|
||||||
BOXED_TYPES : Array[0..Pred(BOXED_TYPES_COUNT)] Of array[0..2] of string = (
|
BOXED_TYPES : Array[0..Pred(BOXED_TYPES_COUNT)] Of array[0..2] of string = (
|
||||||
|
Reference in New Issue
Block a user