Re: [fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

2008-09-29 Thread Michael Schnell
I don't think, full UTF-16 really would be desirable desirable over UC-2. Imagine you have a string of some million characters (e.g. a Book). All functions that need to find the n-th character (like x[n], copy, ...) would take forever, as they need to scan the complete string (if not widest

Re: [fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

2008-09-29 Thread Michael Schnell
The encoding can be important for speed: For example the widestring xml parser is up to 10 times slower than the ansistring xml parser. That obviously is the reason why Turbo - Delphi uses UCS-2 (16 bit) instead of OF UTF-8 or UTF-16 for WideStrings (and WideChar is a 16 bit (UCS-2) value).

Re: [fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

2008-09-29 Thread Michael Schnell
s[i]:='x' doesn't work in UTF-8, nor UTF-16, nor UTF-32. It would work, but it would need an implementation that moves the tail of the string around and thus would be really slow. -Michael ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

2008-09-29 Thread Burkhard Carstens
Am Montag, 29. September 2008 09:25 schrieb Michael Schnell: > > The encoding can be important for speed: > > For example the widestring xml parser is up to 10 times slower than > > the ansistring xml parser. > > That obviously is the reason why Turbo - Delphi uses UCS-2 (16 bit) > instead of OF UT

Re: [fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

2008-09-29 Thread Michael Schnell
That obviously is the reason why Turbo - Delphi uses UCS-2 (16 bit) instead of OF UTF-8 or UTF-16 for WideStrings (and WideChar is a 16 bit (UCS-2) value). You didn't read http://www.jacobthurman.com/?p=30 , did you? They are talking about Delphi 2009, of which I don't have any infor

Re: [fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

2008-09-29 Thread Ivo Steinmann
Michael Schnell schrieb: > >> The encoding can be important for speed: >> For example the widestring xml parser is up to 10 times slower than >> the ansistring xml parser. >> > That obviously is the reason why Turbo - Delphi uses UCS-2 (16 bit) > instead of OF UTF-8 or UTF-16 for WideStrings (an

[fpc-devel] Howto hide Hint: Parameter "xxx" not used

2008-09-29 Thread petr . kristan
Hi. Is there any posibility to hide compiler hint: Hint: Parameter "xxx" not used Other hints I want to see, but this is by my opinion useless and only makes dirty compiler output. I cannot effectively suppres it in my code. For examle: procedure TObj.OnEvent(Sender: TObject); Sometimes I need S

Re: [fpc-devel] Howto hide Hint: Parameter "xxx" not used

2008-09-29 Thread Jonas Maebe
On 29 Sep 2008, at 11:18, [EMAIL PROTECTED] wrote: Is there any posibility to hide compiler hint: Hint: Parameter "xxx" not used No. People regularly ask for the ability to disable particular hints/ warnings, but no one is interested enough to submit a patch to add such functionality to th

Re: [fpc-devel] Howto hide Hint: Parameter "xxx" not used

2008-09-29 Thread Graeme Geldenhuys
On Mon, Sep 29, 2008 at 11:18 AM, <[EMAIL PROTECTED]> wrote: > > Is there any posibility to hide compiler hint: > Hint: Parameter "xxx" not used I agree, it would be nice to suppress that hint! It's quite pointless, 99% of the time. I have seen some code like the following, to suppress that hint

Re: [fpc-devel] Howto hide Hint: Parameter "xxx" not used

2008-09-29 Thread Paul Ishenin
Jonas Maebe пишет: On 29 Sep 2008, at 11:18, [EMAIL PROTECTED] wrote: Is there any posibility to hide compiler hint: Hint: Parameter "xxx" not used No. People regularly ask for the ability to disable particular hints/warnings, but no one is interested enough to submit a patch to add such f

Re: [fpc-devel] Howto hide Hint: Parameter "xxx" not used

2008-09-29 Thread Vincent Snijders
Graeme Geldenhuys schreef: On Mon, Sep 29, 2008 at 11:18 AM, <[EMAIL PROTECTED]> wrote: Is there any posibility to hide compiler hint: Hint: Parameter "xxx" not used I agree, it would be nice to suppress that hint! It's quite pointless, 99% of the time. For this particular hint with Sender

Re: [fpc-devel] Howto hide Hint: Parameter "xxx" not used

2008-09-29 Thread Jonas Maebe
On 29 Sep 2008, at 11:31, Paul Ishenin wrote: Jonas Maebe пишет: On 29 Sep 2008, at 11:18, [EMAIL PROTECTED] wrote: Is there any posibility to hide compiler hint: Hint: Parameter "xxx" not used No. People regularly ask for the ability to disable particular hints/warnings, but no one is inte

Re: [fpc-devel] Howto hide Hint: Parameter "xxx" not used

2008-09-29 Thread Paul Ishenin
Jonas Maebe пишет: On 29 Sep 2008, at 11:31, Paul Ishenin wrote: Jonas Maebe пишет: On 29 Sep 2008, at 11:18, [EMAIL PROTECTED] wrote: Is there any posibility to hide compiler hint: Hint: Parameter "xxx" not used No. People regularly ask for the ability to disable particular hints/warnings,

Re: [fpc-devel] Howto hide Hint: Parameter "xxx" not used

2008-09-29 Thread Jonas Maebe
On 29 Sep 2008, at 11:41, Paul Ishenin wrote: Jonas Maebe пишет: That's just a hack, and you have to regenerate the message file for every new FPC release. Ofcource, but what can we do simple fpc users ;) Submit a patch. The message handling code really isn't rocket science. It's pretty

Re: [fpc-devel] FPC 2.2.3 i386-darwin snapshot

2008-09-29 Thread Felipe Monteiro de Carvalho
On Mon, Sep 29, 2008 at 3:40 AM, Florian Klaempfl <[EMAIL PROTECTED]> wrote: > Try to repeat the static keyword in the body, this could work with 2.2.0 > too. That was the first thing I tryed: controller.pas(85,97) Error: Procedure directive "STATIC" not allowed in implementation section with fp

Re: [fpc-devel] Is calling the Windows Unicode APIs really faster than the ANSI API's?

2008-09-29 Thread Michael Schnell
are you sure they are using UCS2 and not some 16bit codepages? That exists also ;) Not really. I checked the unicodes 0x0100 and 0x0101 (capital and lower case "A" with a dash). Same can correctly be viewed in the debugger when pointing to the WideString variable. So I guess it indeed is un

Re: [fpc-devel] Howto hide Hint: Parameter "yyy" not used

2008-09-29 Thread petr . kristan
On Mon, Sep 29, 2008 at 11:49:29AM +0200, Jonas Maebe wrote: > > On 29 Sep 2008, at 11:41, Paul Ishenin wrote: > >> Jonas Maebe ??: >>> That's just a hack, and you have to regenerate the message file for every >>> new FPC release. >> >> Ofcource, but what can we do simple fpc users ;) > >