* fixed compilation of tbs/tb0460.pp for targets where currency is stored as ordinal.

git-svn-id: trunk@5672 -
This commit is contained in:
yury 2006-12-22 00:48:17 +00:00
parent 8bcf2285c8
commit 8765e488ac

View File

@ -139,6 +139,7 @@ implementation
source : tcallparanode;
procname: string;
is_real : boolean;
rt : aint;
begin
result := cerrornode.create;
@ -169,7 +170,7 @@ implementation
exit;
end;
is_real := source.resultdef.typ = floatdef;
is_real := (source.resultdef.typ = floatdef) or is_currency(source.resultdef);
if ((dest.left.resultdef.typ<>stringdef) and
not(is_chararray(dest.left.resultdef))) or
@ -221,9 +222,12 @@ implementation
if is_real then
begin
{ insert realtype parameter }
if source.resultdef.typ = floatdef then
rt:=ord(tfloatdef(source.left.resultdef).floattype)
else
rt:=ord(tfloatdef(pbestrealtype^).floattype);
newparas.right := ccallparanode.create(cordconstnode.create(
ord(tfloatdef(source.left.resultdef).floattype),s32inttype,true),
newparas.right);
rt,s32inttype,true),newparas.right);
{ if necessary, insert a fraction parameter }
if not assigned(fracpara) then
begin