mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 20:09:27 +02:00
* fixed compilation of tbs/tb0460.pp for targets where currency is stored as ordinal.
git-svn-id: trunk@5672 -
This commit is contained in:
parent
8bcf2285c8
commit
8765e488ac
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user