Re: [fpc-devel] C-block reference syntax (blocker for 3.2)

2019-12-12 Thread Sven Barth via fpc-devel
Am 12.12.2019 um 23:24 schrieb Ryan Joseph via fpc-devel: On Dec 12, 2019, at 11:13 AM, Martin Frb wrote: I brought an example, where actually the "drop [] for last param" would break code. Therefore it no longer matters if it is or is not against good design. Dropping the [], (in the new

Re: [fpc-devel] open array calling [[was: Re: C-block reference syntax (blocker for 3.2)]]

2019-12-12 Thread Michael Van Canneyt
On Thu, 12 Dec 2019, Sven Barth via fpc-devel wrote: Hm. I modified the delphi program to check. It also works with a variable... What kind of braindead "feature" is this ? :( I don't know why Borland decided to add this back then, but the implementation itself is rather easy as an open

Re: [fpc-devel] C-block reference syntax (blocker for 3.2)

2019-12-12 Thread Ryan Joseph via fpc-devel
> On Dec 12, 2019, at 11:13 AM, Martin Frb wrote: > > I brought an example, where actually the "drop [] for last param" would break > code. > Therefore it no longer matters if it is or is not against good design. > Dropping the [], (in the new case, for last param) will break code that >

Re: [fpc-devel] open array calling [[was: Re: C-block reference syntax (blocker for 3.2)]]

2019-12-12 Thread Sven Barth via fpc-devel
Am 12.12.2019 um 17:23 schrieb Michael Van Canneyt: On Thu, 12 Dec 2019, Martin Frb wrote: On 12/12/2019 17:14, Michael Van Canneyt wrote: On Thu, 12 Dec 2019, Sven Barth via fpc-devel wrote: For array of const it is not allowed, but any other open array parameter allows it. Really, are

Re: [fpc-devel] open array calling [[was: Re: C-block reference syntax (blocker for 3.2)]]

2019-12-12 Thread Sven Barth via fpc-devel
Am 12.12.2019 um 17:20 schrieb Martin Frb: On 12/12/2019 17:14, Michael Van Canneyt wrote: On Thu, 12 Dec 2019, Sven Barth via fpc-devel wrote: For array of const it is not allowed, but any other open array parameter allows it. Really, are you sure ? Since when is this allowed ? It works

Re: [fpc-devel] open array calling [[was: Re: C-block reference syntax (blocker for 3.2)]]

2019-12-12 Thread Michael Van Canneyt
On Thu, 12 Dec 2019, Martin Frb wrote: On 12/12/2019 17:23, Michael Van Canneyt wrote: What kind of braindead "feature" is this ? :( Could it be called: Delphi compatibility ?   ;)  :( :( Probably. Well, it's not the first time the brains of the Delphi developers took a day off when they

Re: [fpc-devel] C-block reference syntax (blocker for 3.2)

2019-12-12 Thread Martin Frb
On 12/12/2019 17:05, Sven Barth via fpc-devel wrote: For array of const it is not allowed, but any other open array parameter allows it. Ah, interesting. So then there stands my point from the first mail I wroth in this thread: IIRC - the "do not drop []" arguments, where based on design

Re: [fpc-devel] open array calling [[was: Re: C-block reference syntax (blocker for 3.2)]]

2019-12-12 Thread Martin Frb
On 12/12/2019 17:23, Michael Van Canneyt wrote: What kind of braindead "feature" is this ? :( Could it be called: Delphi compatibility ?   ;)  :( :( ___ fpc-devel maillist - fpc-devel@lists.freepascal.org

Re: [fpc-devel] open array calling [[was: Re: C-block reference syntax (blocker for 3.2)]]

2019-12-12 Thread Michael Van Canneyt
On Thu, 12 Dec 2019, Martin Frb wrote: On 12/12/2019 17:14, Michael Van Canneyt wrote: On Thu, 12 Dec 2019, Sven Barth via fpc-devel wrote: For array of const it is not allowed, but any other open array parameter allows it. Really, are you sure ? Since when is this allowed ? It works

[fpc-devel] open array calling [[was: Re: C-block reference syntax (blocker for 3.2)]]

2019-12-12 Thread Martin Frb
On 12/12/2019 17:14, Michael Van Canneyt wrote: On Thu, 12 Dec 2019, Sven Barth via fpc-devel wrote: For array of const it is not allowed, but any other open array parameter allows it. Really, are you sure ? Since when is this allowed ? It works with a variable in the param list, but not

Re: [fpc-devel] C-block reference syntax (blocker for 3.2)x

2019-12-12 Thread Michael Van Canneyt
On Thu, 12 Dec 2019, Michael Van Canneyt wrote: On Thu, 12 Dec 2019, Sven Barth via fpc-devel wrote: Michael Van Canneyt schrieb am Do., 12. Dez. 2019, 15:34: It was already mentioned, that the [] can be dropped if the array has *exactly one* element. Not sure what you mean here, but

Re: [fpc-devel] C-block reference syntax (blocker for 3.2)

2019-12-12 Thread Michael Van Canneyt
On Thu, 12 Dec 2019, Sven Barth via fpc-devel wrote: Michael Van Canneyt schrieb am Do., 12. Dez. 2019, 15:34: It was already mentioned, that the [] can be dropped if the array has *exactly one* element. Not sure what you mean here, but even if there is only 1 argument, today the []

Re: [fpc-devel] C-block reference syntax (blocker for 3.2)

2019-12-12 Thread Sven Barth via fpc-devel
Michael Van Canneyt schrieb am Do., 12. Dez. 2019, 15:34: > > It was already mentioned, that the [] can be dropped if the array has > > *exactly one* element. > > Not sure what you mean here, but even if there is only 1 argument, today > the [] cannot be dropped: > > home:~> cat tf.pp > program

Re: [fpc-devel] C-block reference syntax (blocker for 3.2)

2019-12-12 Thread Martin Frb
On 12/12/2019 15:34, Michael Van Canneyt wrote: On Thu, 12 Dec 2019, Martin Frb wrote: That still would not break, but it actually is the base for something that would break. The point was to demonstrate that array of const is 1 argument. It is not equal to a variable number of arguments.

Re: [fpc-devel] C-block reference syntax (blocker for 3.2)

2019-12-12 Thread Michael Van Canneyt
On Thu, 12 Dec 2019, Martin Frb wrote: It does gain something: it tells you it is NOT a varargs, but an array of const, which is a different beast altogether. But it's a syntax equivalent for "a variable amount of arguments", i.e. varargs. ;) I guess others don't see it this way however.

Re: [fpc-devel] C-block reference syntax (blocker for 3.2)

2019-12-12 Thread Martin Frb
On 12/12/2019 08:51, Michael Van Canneyt wrote: On Wed, 11 Dec 2019, Ryan Joseph via fpc-devel wrote: On Dec 11, 2019, at 4:16 PM, Michael Van Canneyt wrote: It does gain something: it tells you it is NOT a varargs, but an array of const, which is a different beast altogether. But