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