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

2018-05-20 Thread Michael Van Canneyt
On Sun, 20 May 2018, Sven Barth via fpc-pascal wrote: Hello together! I'm pleased to announce that after nearly a year various extensions for dynamic arrays have been finished. This includes the following features: - support for array constructors using "[...]" syntax - support for

[fpc-pascal] TJSFloat32Array casting

2018-05-20 Thread Ryan Joseph
Did something change? I just tried this and it didn’t work. Casting “arr” to TJSObject didn’t work either. I could swear that used to work a few days ago. Maybe an overload is missing? If TJSArray = TJSObject then should “array of single” = TJSObject? var arr: array of single; begin

Re: [fpc-pascal] TJSFloat32Array casting

2018-05-20 Thread Ryan Joseph
Sorry, I didn’t intend to post to this list. Please disregard. > On May 20, 2018, at 3:23 PM, Ryan Joseph wrote: > > Did something change? I just tried this and it didn’t work. Casting “arr” to > TJSObject didn’t work either. I could swear that used to work a few

[fpc-pascal] Feature announcement: Dynamic array extensions

2018-05-20 Thread Sven Barth via fpc-pascal
Hello together! I'm pleased to announce that after nearly a year various extensions for dynamic arrays have been finished. This includes the following features: - support for array constructors using "[...]" syntax - support for Insert(), Delete() and Concat() - support for "+" operator -

Re: [fpc-pascal] LongBool True = -1

2018-05-20 Thread Sven Barth via fpc-pascal
Dmitry Boyarintsev schrieb am So., 20. Mai 2018, 04:38: > On Thu, May 17, 2018 at 5:26 PM, Anthony Walter wrote: > >> I am working with some a glib library that expects gboolean to be >> positive 1 for true, yet FPC emits -1 for true. >> > > I'd

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

2018-05-20 Thread Anthony Walter
I just got fpc from svn trunk (http://svn.freepascal.org/svn/fpc/trunk/) and tested. Before I submit to Mantis, can you tell me if I made a mistake here? program hello; {$mode delphi} procedure Test; var Data: array of Integer = [0, 15, 24]; I: Integer; begin WriteLn('Testing new array

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

2018-05-20 Thread Jesus Reyes A.
En Sun, 20 May 2018 07:23:25 -0500, Sven Barth via fpc-pascal escribió: Hello together! I'm pleased to announce that after nearly a year various extensions for dynamic arrays have been finished. This includes the following features: - support for array

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

2018-05-20 Thread Maciej Izak
2018-05-20 20:44 GMT+02:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > Anthony Walter schrieb am So., 20. Mai 2018, 19:09: > >> By the way, what's the reason for differences in () / [] syntax between >> objpas and delphi mode? >> > > For the non-Delphi modes

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

2018-05-20 Thread Sven Barth via fpc-pascal
Maciej Izak schrieb am So., 20. Mai 2018, 21:49: > Why you decide to prohibit static array constants inside dynamic array > constants for Delphi modes in r39045? I do not understand this decision. It > is some punishment for using Delphi mode? -,- IMO bad decision. > I

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

2018-05-20 Thread Mattias Gaertner
On Sun, 20 May 2018 14:23:25 +0200 Sven Barth via fpc-pascal wrote: > Hello together! > > I'm pleased to announce that after nearly a year various extensions for > dynamic arrays have been finished. This includes the following features: > > - support for array

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

2018-05-20 Thread Anthony Walter
Holy crap Sven. This is so awesome! I was going to write a request last week to allow for a simplified array constant declaration, and you've already got it done. Thanks for your work. I'll test it momentarily and report any actual problems to Mantis. By the way, what's the reason for

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

2018-05-20 Thread Anthony Walter
Never mind, I found the problem. program hello; {$mode delphi} procedure Test; var Data: array of Integer = [0, 15, 24]; I: Integer; begin WriteLn('Testing new array features'); for I in Data do WriteLn(I); // fixed end; begin Test; end. Outputs: Testing new array features 0 15

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

2018-05-20 Thread Sven Barth via fpc-pascal
Anthony Walter schrieb am So., 20. Mai 2018, 19:09: > By the way, what's the reason for differences in () / [] syntax between > objpas and delphi mode? > For the non-Delphi modes I decided to keep consistency with static array constants (which use the same syntax in Delphi

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

2018-05-20 Thread Michael Van Canneyt
On Sun, 20 May 2018, Mattias Gaertner wrote: On Sun, 20 May 2018 14:23:25 +0200 Sven Barth via fpc-pascal wrote: Hello together! I'm pleased to announce that after nearly a year various extensions for dynamic arrays have been finished. This includes the

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

2018-05-20 Thread Sven Barth via fpc-pascal
Mattias Gaertner schrieb am So., 20. Mai 2018, 17:58: > >[...] > > === code end === > > > > For constants the dynamic array constants adhere to the writable > > constants switch $J. E.g. the following will result in an exception: > > > > === code begin === > > > >

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

2018-05-20 Thread Maciej Izak
2018-05-21 0:52 GMT+02:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > The thing is that I can easily imagine the Delphi devs to be so stoned to > use the "[...]" for static arrays inside dynamic arrays as well which could > lead to constructs like the following because they

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

2018-05-20 Thread Maciej Izak
2018-05-20 22:50 GMT+02:00 Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org>: > I prohibited it because Delphi does not support it correctly and I don't > know whether they'd use the usual "(...)"-syntax for the static arrays or > switch to the dynamic array one. To avoid potential

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

2018-05-20 Thread Sven Barth via fpc-pascal
Maciej Izak schrieb am So., 20. Mai 2018, 23:32: > 2018-05-20 22:50 GMT+02:00 Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org>: > >> I prohibited it because Delphi does not support it correctly and I don't >> know whether they'd use the usual "(...)"-syntax for

Re: [fpc-pascal] fpc-pascal Digest, Vol 167, Issue 39

2018-05-20 Thread Ingemar Ragnemalm
On Sun, 20 May 2018, Sven Barth via fpc-pascal wrote: I'm pleased to announce that after nearly a year various extensions for dynamic arrays have been finished. This includes the following features: - support for array constructors using "[...]" syntax - support for Insert(), Delete() and