[fpc-announce] Feature announcement: Dynamic array extensions

Sven Barth pascaldragon at googlemail.com
Wed Jun 20 21:56:56 CEST 2018


Am 20.05.2018 um 14:23 schrieb Sven Barth:
> 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
> - support for dynamic array constants (and variable initializations)

Addendum: the support for the "+" operator is now coupled to a new 
modeswitch "ArrayOperators".

If the modeswitch is enabled, then the operator can not be overloaded 
and it also won't be used even if an overload from a unit without the 
modeswitch is in scope (the compiler however issues a warning if this is 
the case, so you can either remove the overload or disable the 
modeswitch). If the modeswitch is not enabled then everything behaves as 
before.

The modeswitch is enabled by default in Delphi modes as this feature was 
added for Delphi compatibility. If you want to disable it in those modes 
then you need to do this:

=== code begin ===

{$mode delphi}
{$modeswitch arrayoperators-} // Note the "-"

=== code end ===

Regards,
Sven


More information about the fpc-announce mailing list