[fpc-devel] TXMLDataPacketReader width field attribute

2012-02-29 Thread Dimitrios Chr. Ioannidis
Hi all, the other day i had to do a utility to talk with a delphi written app via its web services api. In no time i had build a prototype with WST which worked perfectly. Now because the result sets was midas's datapacket i added a bufdataset and used the xmldatapacketreader unit. The only

Re: -an and help page (Was: Re: [fpc-devel] Re: Episode 4. Addressing and it's limits Part Two)

2012-02-29 Thread Sven Barth
Am 29.02.2012 00:31, schrieb Tomas Hajny: On 9 Feb 12, at 23:09, Sven Barth wrote: On 09.02.2012 22:14, Mark Morgan Lloyd wrote: Sven Barth wrote: On 09.02.2012 18:59, Mark Morgan Lloyd wrote: Tomas Hajny wrote: Yes, this is what I suggested to do above; for -an, not in general, because I

Re: -an and help page (Was: Re: [fpc-devel] Re: Episode 4. Addressing and it's limits Part Two)

2012-02-29 Thread Mark Morgan Lloyd
Sven Barth wrote: Am 29.02.2012 00:31, schrieb Tomas Hajny: To let Mark (and Sven) know - I tried to add support for this to the compiler but I couldn't make it to work for OPT. The approach is OK in general (apart from the limitation that the compiler may also be compiled without Makefiles

[fpc-devel] Copy function and dynamic array

2012-02-29 Thread LacaK
Hi *, I found small incompatibility between Delphi and FPC. This code: var a,b: array of byte; begin setlength(a,2); b:=copy(a,2,1); //--HERE Range check error in FPC, Delphi returns empty array end; Delphi documentation says: If Index is larger than the length of S, *Copy* returns an

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread ik
On Wed, Feb 29, 2012 at 14:44, LacaK la...@zoznam.sk wrote: Hi *, I found small incompatibility between Delphi and FPC. This code: var a,b: array of byte; begin 适适 setlength(a,2); 适适 b:=copy(a,2,1); //--HERE Range check error in FPC, Delphi returns empty array end; Delphi documentation

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread Sven Barth
Am 29.02.2012 13:54, schrieb ik: On Wed, Feb 29, 2012 at 14:44, LacaKla...@zoznam.sk wrote: Hi *, I found small incompatibility between Delphi and FPC. This code: var a,b: array of byte; begin 适适 setlength(a,2); 适适 b:=copy(a,2,1); //--HERE Range check error in FPC, Delphi returns empty array

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread zeljko
On Wednesday 29 of February 2012 13:54:40 ik wrote: On Wed, Feb 29, 2012 at 14:44, LacaK la...@zoznam.sk wrote: Hi *, I found small incompatibility between Delphi and FPC. This code: var a,b: array of byte; begin 适适 setlength(a,2); 适适 b:=copy(a,2,1); //--HERE Range check error in

RE : [fpc-devel] Copy function and dynamic array

2012-02-29 Thread Ludo Brands
Delphi documentation says: If Index is larger than the length of S, Copy returns an empty string or array. http://docwiki.embarcadero.com/VCL/en/System.Copy Can it be fixed also in FPC? I think it's a Delphi bug to act like that. You must provide a length that is not bigger in

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread Sergei Gorelkin
29.02.2012 17:05, Sven Barth пишет: It's not a bug in Delphi if they write it in the documentation. Whether we should copy this behavior is the question (maybe only in Delphi mode). It cannot be fixed for Delphi mode only because a single copy of RTL is used for all compiler modes. The

Re: RE : [fpc-devel] Copy function and dynamic array

2012-02-29 Thread kyan
In the mean time there is tons of code that relies on copy() copying until end of string or dynamic array. Constructions like param=copy(s,pos('=')+1,length(s)) are plenty. Just do a grep in the fpc compiler dir for copy( and you'l find plenty of copy(s,p+1,255) and the like. Second that, In

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread Sven Barth
Am 29.02.2012 14:31, schrieb Sergei Gorelkin: 29.02.2012 17:05, Sven Barth пишет: It's not a bug in Delphi if they write it in the documentation. Whether we should copy this behavior is the question (maybe only in Delphi mode). It cannot be fixed for Delphi mode only because a single copy of

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread LacaK
Sergei Gorelkin wrote / napísal(a): 29.02.2012 17:05, Sven Barth пишет: It's not a bug in Delphi if they write it in the documentation. Whether we should copy this behavior is the question (maybe only in Delphi mode). It cannot be fixed for Delphi mode only because a single copy of RTL is

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread Sergei Gorelkin
29.02.2012 18:21, LacaK пишет: It cannot be fixed for Delphi mode only because a single copy of RTL is used for all compiler modes. The current situation where out of range 'length' parameter is adjusted but 'index' out of range raises exception is simply self-inconsistent. It is also

Re: [fpc-devel] global property, with getter in other unit

2012-02-29 Thread Hans-Peter Diettrich
Paul Ishenin schrieb: You found some bug in the compiler. Property can only be declared inside a structure but compiler allowed to do this in a unit level. AFAIK unit-properties are an intentional FPC extension over Delphi. I already used it for debugging purposes, replacing global variables

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread Hans-Peter Diettrich
ik schrieb: I think it's a Delphi bug to act like that. You must provide a length that is not bigger in size. It's up to you the developer. Otherwise you might have more then one type of buffer overflows in your code ! The way Delphi solved it, is by taking the responsibility from the

Re: [fpc-devel] [Go32v2] LFN FindFirst bug

2012-02-29 Thread Marco Borsari
Il 28/02/2012 23:34, Tomas Hajny ha scritto: Jonas is right, it is no bug. The difference you get between the case of having LFN enabled or not is most likely related to the fact that you search for '*' mask rather than '*.*' in your example. As you might know, '*' matches I missed that,

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread Martin Schreiber
Am 29.02.2012 14:31, schrieb Sergei Gorelkin: The current situation where out of range 'length' parameter is adjusted but 'index' out of range raises exception is simply self-inconsistent. It is also inconsistent with behavior of Copy for strings. Adjusting index will neither cause any buffer

[fpc-devel] FP IDE fails to compile under FreeBSD 9.0

2012-02-29 Thread Graeme Geldenhuys
Hi, I'm busy setting up a new development system using FreeBSD 9.0 (32-bit) on i386 hardware. I downloaded the FPC 2.6.0 binary release for FreeBSD 8.0, which works fine. But due to the thread / semaphore bug in FPC 2.6.0 (no threaded apps can run) I am forced to use FPC 2.7.1 Anyway, I checked

[fpc-devel] [patch] FP IDE fails to compile under FreeBSD 9.0

2012-02-29 Thread Graeme Geldenhuys
I guess there must be an outdated Makefile or something in Trunk, for FreeBSD. I managed to figure this out, and amend the Makefile.fpc and regenerate the Makefile. Attached is a patch for the ide/Makefile.fpc -- Regards,   - Graeme - ___ fpGUI

Re: [fpc-devel] FP IDE fails to compile under FreeBSD 9.0

2012-02-29 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: I'm busy setting up a new development system using FreeBSD 9.0 (32-bit) on i386 hardware. I downloaded the FPC 2.6.0 binary release for FreeBSD 8.0, which works fine. But due to the thread / semaphore bug in FPC 2.6.0 (no threaded apps can run)

Re: [fpc-devel] Copy function and dynamic array

2012-02-29 Thread LacaK
Sergei Gorelkin wrote / napísal(a): 29.02.2012 18:21, LacaK пишет: It cannot be fixed for Delphi mode only because a single copy of RTL is used for all compiler modes. The current situation where out of range 'length' parameter is adjusted but 'index' out of range raises exception is simply