Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2007-06

this line in pascal compile for i386 version but arm version

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

josepascual

Hi Everyone,

this pascal line
.
.
.
else Result :=Round(VarAsType(dataNum, varDouble))//varInteger) .
.
.

compile okey in 2.1.1 and 2.1.4 fpc for i386 but 2.1.1 and 2.1.4 ppccrossarm

this is the error:

===
.
.
(431,58) Error: Can't determine which overloaded function to call .
.
===
error is talking about Round.

thank you,

Jose Pascual

Jonas Maebe
to josepascual
josepascual wrote 19 lines
else Result :=Round(VarAsType(dataNum, varDouble))//varInteger) . . . compile okey in 2.1.1 and 2.1.4 fpc for i386 but 2.1.1 and 2.1.4 ppccrossarm this is the error: === . . (431,58) Error: Can't determine which overloaded function to call . . === error is talking about Round.

That is because the overload priority for routines which accept a 64 bit integer (int64/qword, currency, and also comp on non-x86) and a 64 bit float(double) is the same when passing a variable variant argument. Since we have round(comp), round(currency) and round (double), the compiler cannot choose which one you want if you pass a variant. The reason it compiles on i386, is that you also have a round (extended) there, which has a higher priority than the 64 bit variants.

So you need to fix your code by adding an extra VarAsType(...,double) call.

Jonas

josepascual
to Jonas Maebe: That is because the overload priority for routines which accept a 64 bit integer…

Hi Jonas,

Show quoted text 41 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Jonas Maebe Enviado el: miércoles, 13 de junio de 2007 11:42 Para: FPC-Pascal users discussions Asunto: Re: [fpc-pascal] this line in pascal compile for i386 version but arm version On 13 jun 2007, at 11:34, josepascual wrote: > else Result :=Round(VarAsType(dataNum, varDouble))//varInteger) > . > . > . > > compile okey in 2.1.1 and 2.1.4 fpc for i386 but 2.1.1 and 2.1.4 > ppccrossarm > > > this is the error: > > === > . > . > (431,58) Error: Can't determine which overloaded function to call > . > . > === > error is talking about Round. That is because the overload priority for routines which accept a 64 bit integer (int64/qword, currency, and also comp on non-x86) and a 64 bit float(double) is the same when passing a variable variant argument. Since we have round(comp), round(currency) and round (double), the compiler cannot choose which one you want if you pass a variant. The reason it compiles on i386, is that you also have a round (extended) there, which has a higher priority than the 64 bit variants. So you need to fix your code by adding an extra VarAsType(...,double) call.

How can I do it?

else Result :=Round(double(VarAsType(dataNum, varDouble)))//varInteger)

or other solution?

thank you in advanced

Jose Pascual

Show quoted text 10 lines
Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal __________ Informacisn de NOD32, revisisn 2325 (20070612) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com
josepascual

Hi Jonas,

Show quoted text 41 lines
-----Mensaje original----- De: [mailto:fpc-pascal- En nombre de Jonas Maebe Enviado el: miércoles, 13 de junio de 2007 11:42 Para: FPC-Pascal users discussions Asunto: Re: [fpc-pascal] this line in pascal compile for i386 version but arm version On 13 jun 2007, at 11:34, josepascual wrote: > else Result :=Round(VarAsType(dataNum, varDouble))//varInteger) > . > . > . > > compile okey in 2.1.1 and 2.1.4 fpc for i386 but 2.1.1 and 2.1.4 > ppccrossarm > > > this is the error: > > === > . > . > (431,58) Error: Can't determine which overloaded function to call > . > . > === > error is talking about Round. That is because the overload priority for routines which accept a 64 bit integer (int64/qword, currency, and also comp on non-x86) and a 64 bit float(double) is the same when passing a variable variant argument. Since we have round(comp), round(currency) and round (double), the compiler cannot choose which one you want if you pass a variant. The reason it compiles on i386, is that you also have a round (extended) there, which has a higher priority than the 64 bit variants. So you need to fix your code by adding an extra VarAsType(...,double) call.

How can I do it?

else Result :=Round(double(VarAsType(dataNum, varDouble)))//varInteger)

or other solution?

thank you in advanced

Jose Pascual

Show quoted text 10 lines
Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal __________ Informacisn de NOD32, revisisn 2325 (20070612) __________ Este mensaje ha sido analizado con NOD32 antivirus system http://www.nod32.com