Maciej Izak <hnb.c...@gmail.com> 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 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 backwards compatibility
problems I decided to simply disallow it. And to be fair: how often do you
declare dynamic arrays that consist of static arrays?

For the consequence the following code
>
> var
>   f: array of TSomeRec = [(a: 10; b: ['1', '2']), (a: 20; b: ['6'])];
>
> should be also prohibited in Delphi mode, because it not works in Delphi
> like static array constants inside dynamic array constants...
>

I had not tested that one. In consequence that should indeed be disallowed
as well. Though here the syntax probably wouldn't provide problems in the
future.

Regards,
Sven

>
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to