Re: [fpc-pascal] FPC can't determine overloaded function to call

2016-04-28 Thread Jonas Maebe
On 28/04/16 15:33, Graeme Geldenhuys wrote: Interesting thought. But a Integer div Integer cannot give a result larger than a Integer type, so why is the compiler upscaling the result it to a Int64?? If that is really what the compiler is doing, then something is going way wrong, or I simply don'

Re: [fpc-pascal] FPC can't determine overloaded function to call

2016-04-28 Thread Graeme Geldenhuys
On 2016-04-28 14:02, Graeme Geldenhuys wrote: > ...snip... > P.DrawImage(25, 190, W div 2, H div 2, IDX); // this fails > > Yet this works > P.DrawImage(25, 190, Integer(W div 2), Integer(H div 2), IDX); In this specific example, the following also works - and without the need for the Inte

Re: [fpc-pascal] FPC can't determine overloaded function to call

2016-04-28 Thread Graeme Geldenhuys
On 2016-04-28 14:22, Peter wrote: > I suspect '(W div 2) gives int64. Interesting thought. But a Integer div Integer cannot give a result larger than a Integer type, so why is the compiler upscaling the result it to a Int64?? If that is really what the compiler is doing, then something is going wa

Re: [fpc-pascal] FPC can't determine overloaded function to call

2016-04-28 Thread Peter
On 28/04/16 14:02, Graeme Geldenhuys wrote: > Hi, > > I can't figure out why FPC is struggling with figuring out which > overloaded methods to call. This is my application code which FPC has a > problem with. > > type > TPDFFloat = Single; > > TPDFCoord = record > X,Y: TPDFFloat; > end

[fpc-pascal] FPC can't determine overloaded function to call

2016-04-28 Thread Graeme Geldenhuys
Hi, I can't figure out why FPC is struggling with figuring out which overloaded methods to call. This is my application code which FPC has a problem with. type TPDFFloat = Single; TPDFCoord = record X,Y: TPDFFloat; end; var W, H: integer begin ...snip... P.DrawImage(25, 190, W d