Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 25. Mai 2018, 07:55: > The procedural syntax of Insert(arr, 0, value) is less enticing than > arr.Insert(0, value) also but again we can fix that with type helpers. > You are overestimating what type helpers are capable of doing for dynamic arrays - see my remark abou

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Michael Van Canneyt
On Fri, 25 May 2018, Ryan Joseph wrote: On May 25, 2018, at 12:43 PM, Michael Van Canneyt wrote: I think the above is "right", and completely equivalent to sets, which are in some ways like an array: a "collection" of same typed values. To add an element to a set you also do MySet:=My

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Sven Barth via fpc-pascal
Ryan Joseph schrieb am Fr., 25. Mai 2018, 04:35: > > > > On May 25, 2018, at 1:37 AM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > This is currently not supported. And to avoid backwards compatibility > problems with existing operator overloads you'd probably need

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Ryan Joseph
> On May 25, 2018, at 12:43 PM, Michael Van Canneyt > wrote: > > I think the above is "right", and completely equivalent to sets, which are in > some ways > like an array: a "collection" of same typed values. > > To add an element to a set you also do > MySet:=MySet+[aValue]; > > That said

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Michael Van Canneyt
On Fri, 25 May 2018, Ryan Joseph wrote: On May 25, 2018, at 1:37 AM, Sven Barth via fpc-pascal wrote: This is currently not supported. And to avoid backwards compatibility problems with existing operator overloads you'd probably need to convert it to a dynamic array first: === code be

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Ryan Joseph
> On May 25, 2018, at 1:37 AM, Sven Barth via fpc-pascal > wrote: > > This is currently not supported. And to avoid backwards compatibility > problems with existing operator overloads you'd probably need to convert it > to a dynamic array first: > > === code begin === > > a += ['foo']; >

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Anthony Walter
I just wanted to drop this trick to work around problems with record helpers .. If you wanted to create a record helper for a type that is not normally allowed, or perhaps you want to have multiple record helpers for the same type, consider defining your own separate type and make it contain said

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Sven Barth via fpc-pascal
Am 24.05.2018 um 17:27 schrieb Ryan Joseph: On May 20, 2018, at 7:23 PM, Sven Barth via fpc-pascal wrote: The compiler now implements a "+" operator for arrays which is the same as if Concat() would be called on the arrays. I haven’t built it yet but I’m curious, does += now push an eleme

Re: [fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-24 Thread Ryan Joseph
> On May 20, 2018, at 7:23 PM, Sven Barth via fpc-pascal > wrote: > > The compiler now implements a "+" operator for arrays which is the same as if > Concat() would be called on the arrays. > I haven’t built it yet but I’m curious, does += now push an element to the array or does this just

Re: [fpc-pascal] Libxml2 - How to get messages on Linux?

2018-05-24 Thread Michael Van Canneyt
On Wed, 23 May 2018, Gabor Boros wrote: Same problem with Win64. So not Linux specific. Are these functions callbacks ? If so, is the calling convention correct ? Michael. Gabor 2018. 05. 22. 10:06 keltezéssel, Gabor Boros írta: Hi All, I need to accomplish validate XML files with an X