View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0036133||FPC||Compiler||public||2019-10-03 13:06||2019-10-09 13:47|
|Summary||0036133: not compiled some of the data transmitted in function Round|
|Description||When using this function, multiplying some numbers by a variable makes it impossible to compile the program for Windows 64 bit.|
|Steps To Reproduce||1. Writing code:|
2. Compiled for for Windows 64 bit.
3. Get compilation error:
3.pp(7,5) Error: Can't determine which overloaded function to call
3.pp(9) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
|Additional Information||In Linux and Win32 the error is not found.|
|Tags||No tags attached.|
|Fixed in Revision|
Please note that in your specific example the Round is superfluous as you're working with Integer types anyway.
The Round is only necessary if you want to work with either floating point types or types like Currency or Comp. In those cases you should either use casts or declare one of the variables accordingly to have the correct results.
The overloads that the compiler picks up are those for Currency and Comp, but as those are both declared as Int64 on Win64 (or any non-x86 platform) the compiler can't pick the correct method, so you need to use one of the solutions above for now (though I don't know yet whether we're going to fix this, I've asked the other devs for their opinion).
||It happens that you don’t remember what type of variable or constant you have, and use Round again. Thus, it was discovered, and for a long time I could not understand why it was multiplied by 120 and everything was fine, and when multiplied by 141, an error occurred.|
||In the file an example for all platforms|
|2019-10-03 13:06||Skvoznjak||New Issue|
|2019-10-03 13:06||Skvoznjak||File Added: 3.pp|
|2019-10-03 18:54||Sven Barth||Note Added: 0118286|
|2019-10-03 21:25||Skvoznjak||Note Added: 0118296|
|2019-10-09 12:25||Boris Glavin||File Added: Project1.pas|
|2019-10-09 12:25||Boris Glavin||Note Added: 0118443|