Re: [fpc-pascal] UnicodeString and surrogate pairs

2016-04-28 Thread Michael Schnell
On 04/27/2016 04:36 PM, Graeme Geldenhuys wrote: Does FPC's RTL (or FCL) include a function to check for UTF-16 surrogate pairs? Would that necessarily be an UTF-8 issue ? -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://l

Re: [fpc-pascal] Iterator for Unicode encoded strings

2016-04-28 Thread Michael Schnell
AFAIR, a member of the German Lazarus Forum implemented an iterator class for UTF8 some years ago (before there was Unicode support in fpc). -Michael ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailma

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] TMaskUtils.ValidateInput function: how is it supposed to behave?

2016-04-28 Thread Bart
On 4/18/16, Michael Van Canneyt wrote: > I think Bart meant that the maskutils unit should simply use unicodestring. > Given that it almost surely will need to deal with $ and € etc, that seems > like a better approach. FWIW an unicode version for testing attached. Bart umaskutils.pp Descript

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

[fpc-pascal] Is there a FPC symbol or define for the binary output filename?

2016-04-28 Thread Paul Michell
Hello All, I'm writing a library that needs to be used as statically linked units in an application and also as a stand alone dll/so for use from other software. The library needs to know where its binary file is loaded on the host system. The following code in the main unit's Initialization